PDA

View Full Version : two quick questions on vim and C++



jimi_hendrix
November 22nd, 2008, 09:59 PM
is there a way to collapse code in vim like an IDE

and also...if i make my own header file do i need to add it to my make files?

conehead77
November 22nd, 2008, 11:03 PM
:set foldmethod=syntax

then fold with zm and unfold with zr.
:help folding should help too.

jimi_hendrix
November 22nd, 2008, 11:13 PM
ok...also in the .vimrc is there a way i can put that so i dont have to do the set thing everytime?

dexter
November 22nd, 2008, 11:36 PM
Sure, just add "set foldmethod=syntax" (without quotes) to your .vimrc file.

jimi_hendrix
November 23rd, 2008, 02:26 AM
how do i test a header file for errors?