Today I told ak about some nice
vim functions which are usefull for programmers (especially C) and it seems that not
everyone knows about them.
The first thing I would like to mention is
% which jumps from an open brace to its matching close brace. It does work for for #ifdef #endif too (Of course they are considered as bad coding style).
gd is most usefull for me. I need it very often. It jumps to the declaration of the variable which is currently under the cursor. For example if your cursor is on ch=getch(); and you press ESC gd it will jump to char ch; and you will see that ch is a character.
* and
# are very nice too cause they do a search for the word under the cursor, forward and backward.
gf can be used if you want to open a header file which is included without opening a new screen window or to go to the vim command line. It opens the file under the cursor so pressing it if you are on #include "foobar.h" will open foobar.h if it
is in the same directory.
Hope this helps, they are a must use for C programers