compile directly from vim

后端 未结 6 1180
独厮守ぢ
独厮守ぢ 2021-01-31 05:43

I\'d like to compile cpp file w/o turning off vi.
I know the :!g++ file.cpp but I prefer :make so I added this line in .vimrc file

6条回答
  •  天涯浪人
    2021-01-31 06:33

    I think it's much easier if you write a Makefile and put it where vi can find it. I'm not sure if you actually use vi (I've only used Vim), but when there is a Makefile compiling should be as easy as writing :make (no set makeprg needed).

提交回复
热议问题