On Saturday, June 04, 2011 19:00:39 Tony Mechelynck wrote:

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

another way to approach it would be to call glob() with an
asterisk in place of the <Tab>

sc

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

Reply via email to