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