Saturday, June 4, 2011

Trying to escape tab in exe

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
--
Tim
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com

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