Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
406 views
in Technique[技术] by (71.8m points)

compilation - Running :make from gVim in Background

I use gVim in windows to edit my code (mostly C++). I use :make in gVim to compile the project, but this is a blocking operation, that prevents me from using gVim until the compilation is complete. How can I do :make asynchronously and still get the benefits of reading the errors back into Vim and jump to the errors in source code? Bonus points if I get to see the make process in real time. Right now the :make redirects the output into a file, hence I don't get to see the progress of make.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

What I do is

:!gvim -c 'MyMake'

( where MyMake is the custom command which can switch to appropriate dir, make, and copen 20. )

and I am doing my job while build goes in the other window.

Other option:
You can redirect make progress to some file from the shell or within vim (:!make&). And then by using

:cfile make_result_file

:cw
 or
:copen 20 

Achieve the same result as you'd use :make


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...