> But is there a way for reading in the contents of files present under
> directories,
> specified by path variable e.g.
> :r file_inside_dir<TAB>
As you noticed, :read doesn't consult 'path'.
Here's a quick implementation:
fun! Read(file)
let full_path = findfile(a:file)
exe "read " . full_path
endfun
fun! PathComplete(A,L,P)
return split( globpath(&path, a:A."*"), "\n")
endfun
command! -complete=customlist,PathComplete -nargs=1 Read call Read('<args>')
Use like so:
:Read foo<tab>
HTH,
--
JR
--
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