[ANN] Understanding Vim's excalamation mark command quoting/escaping rules

[ANN] Understanding Vim's excalamation mark command quoting/escaping rules

Shlomi Fish shlomif at gmail.com
Fri Apr 1 15:38:42 IDT 2016


Hi Daniel,

thanks for your reply,

On Fri, Apr 1, 2016 at 9:03 AM, Daniel Shahaf <d.s at daniel.shahaf.name>
wrote:

> Shlomi Fish wrote on Thu, Mar 31, 2016 at 22:56:28 +0300:
> > I prepared a document where I investigated which characters need to be
> > escaped in vim's ":!" commands of filtering the text through a shell
> > command.
>
> The escape rules are documented:
>
>     :help cmdline-special
>
>
I see - thanks. I was unable to find them in:

1. vim's help.

2. DuckDuckGo search.

3. Google search.

4. asking on freenode's #vim chatroom.

and the text there seems somewhat confusing.


> > Executive summary:
> >
> > - “%”, “#”, and “!” should be escaped with a backslash (“\”).
> >
> > - All other punctuation/special characters (including a backslash)
> > need not and should not be escaped.
>
> Beyond [%#!] which you mention, there are also:
>
> - «<cword>» and friends
>
> - The envvars $MYVIMRC, $VIM, $VIMRUNTIME are available (:help $VIM,
>   :help $MYVIMRC)
>
> - A literal LF (ASCII 0x0A) can't be entered (:help NL-used-for-NUL)
>
>
thanks for the info!


> Cheers,
>
> Daniel
>



-- 
------------------------------------------
Shlomi Fish http://www.shlomifish.org/

Chuck Norris helps the gods that help themselves.

Please reply to list if it's a mailing list post - http://shlom.in/reply .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20160401/a962d3ed/attachment.html>


More information about the Linux-il mailing list