> removing the paths, e.g.:
>
> let s:CompletionPath = ''
>
> function! CompleteFromPath(ArgLead, CmdLine, CursorPos)
> let files = split(glob(s:CompletionPath . '*'), "\n")
> call map(files, 'substitute(v:val, ".*/", "", "")')
> return join(files, "\n")
> endfunction
>
> function! VS()
> let s:CompletionPath = '~/public_html/jeditux.home/vim_sessions/'
> let ans = input('Session name: ', '', 'custom,CompleteFromPath')
> execute ':source ' . s:CompletionPath . ans
> endfunction
>
> Regards,
> J rgen
Wow! That was really cool. Worked exactly as I expected.
That was my first try to write something in Vim's language,
and I don't understand your (GREAT) version of the script
yet. (reading the extensible help)
I really appreciate your willing in spending time to help and
write this nice function. Thank you very much.
May the force be with you. Always.
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment