Saturday, June 4, 2011

Re: Trying to escape tab in exe

On 05/06/11 00:30, Tim Johnson wrote:
> If I type in the following ex command:
> :e /home/tim/prj/cgi/baker/xmlimport/controllers/
> and then press TAB, I get a wildmenu for the target
> directory. Yay!
> But I can't get this same function to work programmatically.
> I have the following two functions:
> " --------------------------------------------------------------------
> function! EdDir(dir)
> execute 'e ' . a:dir . '/\<Tab>'
> endfunction
> " --------------------------------------------------------------------
> function! EdControllers()
> execute 'call EdDir("' . g:ControllerFolder . '")'
> endfunction
> " --------------------------------------------------------------------
> " where g:ControllerFolder is '/home/tim/prj/cgi/baker/xmlimport/controllers'
> If I execute
> : call EdControllers()<cr>
> vim opens a new file
> /home/tim/prj/cgi/baker/xmlimport/controllers/<Tab>
> grrr!
> So how do I escape the Tab?
> I've tried
> :h execute, and don't find any help there.
>
> thanks
> using vim 7.2 Huge version with GTK2-GNOME GUI

IIRC, the relevant setting is 'wildcharm' (q.v.).


HTH,
Tony.
--
hundred-and-one symptoms of being an internet addict:
103. When you find yourself in the "Computer" section of Barnes & Noble
enjoying yourself.

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

Post a Comment