Click to See Complete Forum and Search --> : Vim question


arnesten
03-10-2001, 06:15 PM
When I start vim I want it to automatically set the option makeprg to a certain string.
This could be done by just adding "set makeprg=<string>" to ~/.vimrc, but I want the string to be different depending on if it is a C++ file or Java file that I'm opening.

Do we have any hardcore vim users here that could help me with this rather complex problem?

fow99
03-12-2001, 01:50 PM
I think what you need to do is to insert a line or two in the .vimrc file using autocmd bla.... Note quite sure about the syntax though.