I have a bunch of files in (project)/src and (project)/inc.
When I press <C-x><C-f>
vim should give me suggestions about filenames from there but I couldn't find how to set the directories it searches in.
The documentation I read says only that <C-p>
and <C-n>
moves inside the list but nothing about calibrating the search path.
set autochdir
automatically sets the "current directory" to the one containing the current file. Put it in your vimrc, enjoy life.
Its the pwd
or the path from where the vim
was launched.Its not configurable.
Although a new feature called path
-support will be available in vim
soon:
http://vimdoc.sourceforge.net/htmldoc/options.html#%27path%27
That might help you configure more.
In the meantime try these vim plugins:
FuzzyFinder http://www.vim.org/scripts/script.php?script%5Fid=1984
zvim https://bitbucket.org/ZyX_I/zvim
t-command http://www.vim.org/scripts/script.php?script_id=3025
Or you can write your own vim plugin.
Refer:
http://vim.wikia.com/wiki/Searching_for_files_in_a_directory_listing
And
http://vim.wikia.com/wiki/Source_vimrc_and_use_tags_in_a_parent_directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With