Tuesday, February 15, 2011

Re: Ctrl-X Ctrl-F file completion mode: how to choose slash and mode

On Feb 15, 8:38 am, "Christian Brabandt" <cbli...@256bit.org> wrote:
> On Tue, February 15, 2011 1:32 pm, Dmitry Teslenko wrote:
> > 1) Is there way to choose slash (win32/unix) vim prints in file
> > completion mode (C-X, C-F)?
> > I want vim print unix slash on win32 platform in some cases.
>
> I think, setting shellslash will do that.
>

Yes it does, which is one of the reasons I have 'shellslash' set. Be
aware though, that 'shellslash' can interfere with plugins if the
authors did not account for it. And be careful of it in your own
config files.

In particular, I have the following in my .vimrc to set it in the
first place (I don't remember the specific problem I was having):

" use forward slashes on Windows, but wait until after everything is
loaded to
" not screw stuff up
if has('autocmd')
autocmd VimEnter * set shellslash
endif

Also, cscope on Windows does NOT like forward slashes, so beware of it
when working with CScope.

Note the following entries related to 'shellslash' in :help todo:

Completion for ":buf" doesn't work properly on Win32 when 'shellslash'
is off.

shellescape() depends on 'shellshash' for quoting. That doesn't work
when
'shellslash' is set but using cmd.exe.

Win32: When 'shell' is bash shellescape() doesn't always do the right
thing.
Depends on 'shellslash', 'shellquote' and 'shellxquote', but
shellescape()
only takes 'shellslash' into account.

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

No comments: