Opening vim from the root of the source file and expanding the path option to include all subdirectories in it.
For example, set path+=/usr/include/c++/** for C ++ headers and set path+=** for your source directory.
This opens up many possibilities.
1) Opening a file by name or part thereof
:find file_name
You can reliably use auto-completion and template expansion with :find . You enter a name, it will find the name. This works regardless of language. I am sure you will like it.
2) Going to files in Cusror:
if you want to specify the path to the file, for example #include "project/path/classA.h .
gf or gF - go to file under cursor.
Ctrl - 6 - to return to the last cursor position after gf or gF
3) Search API and move to API location
[i or [I can be used to search for function signatures for a word under the cursor without leaving the workspace. [<Tab> actually go to the declaration. Use Ctrl - 6 to return to last place.
Without extending the path , you can start file navigation with the command :Ex , and also navigate and open your file. I prefer NerdTree though that.
dlmeetei Jan 27 '16 at 2:07 p.m. 2016-01-27 14:07
source share