开发者

How to set ":make" to use scons?

开发者 https://www.devze.com 2022-12-12 14:25 出处:网络
I know there is a way to make vim run scons instead of make when I press :make. I had an option that did this in my ~/.vimr开发者_如何学Goc but I removed it a while ago and forgot what it was.I had t

I know there is a way to make vim run scons instead of make when I press :make.

I had an option that did this in my ~/.vimr开发者_如何学Goc but I removed it a while ago and forgot what it was.


I had the same problem this weekend. I didn't want to type :set makeprg=scons every time I started Vim or hard-code 'makeprg' in my .vimrc, because I use make for some projects, maven for others, rake..., et cetera ...

So today I wrote a Vim plugin called Makeshift to determine what to call for :make by looking for known files (Makefile, SConstruct, pom.xml, ...) and setting 'makeprg' accordingly.

Details are on vim.org for DoR and future visitors to this question.


Set makeprg. I'm not sure if any options are required for scons, but it might look like:

set makeprg=scons
0

精彩评论

暂无评论...
验证码 换一张
取 消