当前位置: 技术问答>linux和unix
vim有没有插件可以象VC那样的上面是代码,下面是编译的信息
来源: 互联网 发布时间:2016-05-09
本文导语: 每次GCC完出错了又要VIM进去修,然后才GCC,这样感觉很麻烦,不知道有没有那种插件可以实现这个功能下面GCC,上面可以修改代码 | 不知道LZ用的什么系统。 我一般都是同时开好几个终端窗口,若...
每次GCC完出错了又要VIM进去修,然后才GCC,这样感觉很麻烦,不知道有没有那种插件可以实现这个功能下面GCC,上面可以修改代码
|
不知道LZ用的什么系统。
我一般都是同时开好几个终端窗口,若干个vi,一个gcc或make,一个gdb,一个man,等等
还有一个办法,在vi里用这个命令:
:!gcc hello.c
然后用这个运行
:!./a.out
我一般都是同时开好几个终端窗口,若干个vi,一个gcc或make,一个gdb,一个man,等等
还有一个办法,在vi里用这个命令:
:!gcc hello.c
然后用这个运行
:!./a.out
|
LZ说的那种类似的功能好像也是有的。
在vi里:help,有一个文件讲这个,我这里是:
|usr_30.txt| Editing programs
/usr/share/vim/vim61/doc/usr_30.txt
部分内容如下:
*30.1* Compiling
Vim has a set of so called "quickfix" commands. They enable you to compile a
program from within Vim and then go through the errors generated and fix them
(hopefully). You can then recompile and fix any new errors that are found
until finally your program compiles without any error.
The following command runs the program "make" (supplying it with any argument
you give) and captures the results: >
:make {arguments}
......
The following command goes to where the next error occurs: >
:cnext
Vim jumps to line 10, the last line in the file, where there is an extra '}'.
......
在vi里:help,有一个文件讲这个,我这里是:
|usr_30.txt| Editing programs
/usr/share/vim/vim61/doc/usr_30.txt
部分内容如下:
*30.1* Compiling
Vim has a set of so called "quickfix" commands. They enable you to compile a
program from within Vim and then go through the errors generated and fix them
(hopefully). You can then recompile and fix any new errors that are found
until finally your program compiles without any error.
The following command runs the program "make" (supplying it with any argument
you give) and captures the results: >
:make {arguments}
......
The following command goes to where the next error occurs: >
:cnext
Vim jumps to line 10, the last line in the file, where there is an extra '}'.
......
|
http://blog.csdn.net/PrideRock/archive/2008/03/16/2186282.aspx
http://blog.csdn.net/wooin/archive/2007/10/31/1858917.aspx
http://blog.csdn.net/suppercom/archive/2007/06/02/1634865.aspx
http://blog.csdn.net/easwy/archive/2007/10/17/1828678.aspx
http://blog.csdn.net/wooin/archive/2007/10/31/1858917.aspx
http://blog.csdn.net/suppercom/archive/2007/06/02/1634865.aspx
http://blog.csdn.net/easwy/archive/2007/10/17/1828678.aspx
|
quick fix window 可以完成(大概又叫Error List Window)
http://www.myths.com/pub/doc/oh_really/unix_bookshelf_3.0/vi/ch10_09.htm
http://www.myths.com/pub/doc/oh_really/unix_bookshelf_3.0/vi/ch10_09.htm
|
不用,只要写好makefile,直接:make就可以了
然后还可以在quickfix看不编译信息
然后还可以在quickfix看不编译信息
|
..