Wednesday, March 31, 2021

C/C++ manpages quick access from VIM

Vim has by default a helpful shortcut to open the man page of the word under cursor, Shift + k, (or captital K), but very frequently we have shell commands with the same name of a C function, and for example

man printf actually opens the man page for the command, not the C function, but

man 3 printf opens the man pages of the C function, so to open this same man page in Vim, you need to use Shift + 3k (3K)

and for example readlink C function it's man 2 readlink, so in Vim it is Shift + 2k (2K)

Install C++ man pages libstdc++-10-doc


No comments:

Blog Archive