Thursday, September 13, 2018

Re: "

Le jeudi 13 septembre 2018 14:13:45 UTC+2, Erik Christiansen a écrit :
> On 13.09.18 01:53, Ni Va wrote:
> >
> > I need to edit buffer that contains vbscript that has " chars and friends ...
> >
> > Without definitively write current edited file, How can I change all
> > that chars in order to be able to make modification in an easy view ?
>
> :%s/&quot/"/

fun! EncodeHtmlEntities( ) "{{{

let s:decode = {
\ "&": '&' ,
\ ">": '>' ,
\ "&lt;": '<' ,
\ "&apos;": "'" ,
\ "&quot;": '"' }
for k in keys(s:decode)
silent! exe "%s/".k.'/\=get(s:decode, submatch(0), submatch(0))/g'
endfor

endfunction "}}}

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: