Reputation: 341
Say I'm including a header file in vim while writing a C program, e.g
#include <time.h>
I have no idea what structures or functions are declared there. How can I jump to that file and open it in Vim? Is there any way to do that?
Upvotes: 0
Views: 2478
Reputation: 196546
On Unix-like systems, Vim is already wired for C by default so you only have to move the cursor to <time.h>
and press gf
, to open the header in the same window or <C-w>f
to open it in a new window.
See this answer to a similar question that was asked a few hours ago for additional pointers.
Upvotes: 4
Reputation: 78
You can use:
find . -name "time.h"
to find the file and then you can copy the path and open it with vim.
But this this won't really help, because its not as structured as you might think it is. To learn more about time.h I would google it. There are several websites explaining structs, functions etc.
For example: https://www.tutorialspoint.com/c_standard_library/time_h.htm
Upvotes: 0