Tuesday, April 12, 2016

Re: Escaping in command line completion

2016-04-12 23:54 GMT+03:00 <nwt248@gmail.com>:
> On Tuesday, April 12, 2016 at 4:51:38 PM UTC-4, nwt...@gmail.com wrote:
>> I have a set of files, whose names contain various punctuation characters like # and $. E.g. FOO#BAR and BIZ$BAZ.
>>
>> When editing a file via ":e" the command line completion works fine for file names with #. Typing ":e FOO#<TAB>" shows me files matching that pattern. The # is escaped by vim automagically and appears as ":e FOO\#xxx".
>>
>> The same does not work for files containing "$". No matches are produced when entering ":e BIZ$<TAB>". According to 'cmdline.txt' help, the "$" is interrupted as end of string.
>>
>> Is there a way to escape the "$" and treat it as a literal? Is there another way to edit/open files from the command line that will get around this issue and yet provide auto-completion of names? I'm not interested in using any plugins..
>>
>> TIA,
>> Jonathan
>
> I should point out that I've already tried escaping "$" as "\$" and "$$" to no avail.

You are on Windows? If yes, please read
https://github.com/vim/vim/issues/541 (specifically point 3), `$`
cannot be escaped there. You can work around this only by using
<code>`="BIZ$BAZ"`</code>.

>
> --
> --
> 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.

--
--
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:

Post a Comment