Wednesday, January 27, 2010

Vim script, not show path.

I have this little script:
function! VS()
let mypath = '~/public_html/jeditux.home/vim_sessions/'
let ans = input('Session name: ', mypath, 'file')
execute ':source ' ans
endfunction

http://vim.pastey.net/132026

In the line 'let ans = input ... ... ' I had to include the path
because otherwise the script would attempt
to complete filenames from the current dir I am, not the dir with the
vim saved sessions.

I need a way to make the script not show the path when asking for
'Session name', just to make it more
clear for when I'm typing the file name.

Any help would be appreciated. Thanks in advance.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment