3 ms·
Vim is enough of an IDE for C programming, certainly. With ctags and GNU id-utils (mkid, lid), you get great code browsing: instantly find where things are def
by kazinator 9y ago
Vim is enough of an IDE for C programming, certainly.
With ctags and GNU id-utils (mkid, lid), you get great code browsing: instantly find where things are defined using tags, and where they are referenced with ID utils.
I map the K command (normally used for man page lookup for the word under the cursor) to do a lid lookup and turn the results into a quicklist. The :grep command is also mapped to lid lookups via grepprg. lid uses a binary database file named ID which is generated using mkid. It instantaneously finds all occurrences of any identifier in a fairly large tree, like the Linux kernel.
There is a code completion plugin for Vim so when you type foo.bar->, you see a popup with a list of structure members and such.
Of course, there is the great syntax highlighting and auto-indentation which catch coding typos as you make them: IDE-like feature.
Vim's :make turns compiler errors into a quickfix list so you can move between them and fix. I map :W so that it saves the buffer and runs :make.