由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 如何从vim里直接编译源代码 (转载)
相关主题
问大家一个C语言编程的小问题One question in C programming
valgrind和purify支持partial build么?关于不同系统编译的问题
any tool to recommend to port c++ code from windows to linuxmakefile 问题请教
Makefile疑问大型程序如何加快编译速度
关于Makefile的一个问题最近谁编译过gcc?
make的时候能不能指定某个路径下的ld? (转载)node express.js如何package
c程序用g++编译需要改动么?你们公司里的大型c++程序都是怎么编译的?
如何把Linux平台下C++源代码转换到 windows平台下编译?如何写入版本信息
相关话题的讨论汇总
话题: vim话题: 编译话题: window话题: errors话题: 源代码
进入Programming版参与讨论
1 (共1页)
c*********t
发帖数: 2921
1
【 以下文字转载自 Linux 讨论区 】
发信人: cookiesweet (apple), 信区: Linux
标 题: 如何从vim里直接编译源代码
发信站: BBS 未名空间站 (Sun May 22 04:16:46 2011, 美东)
能不能象在emacs里那样,可以编译正在edited 的源文件,上面一个window显示源代码
,下面的一个window显示出错信息(errors)?这样可以从出错的地方,直接跳到相应的
代码行。
在vim里,试了:!gcc -o test test.c
还试了:!make (当然了俺做了个makefile)
vim都是临时跳出到shell,显示编译的出错的信息。这跟自己退出vim,在shell下直接
编译没有任何区别。
就想能自动在vim里编译,谁能给个解决方案。
t****t
发帖数: 6806
2
you can just use :make and it will still call an external shell. but you can
jump around errors in source files.

【在 c*********t 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 发信人: cookiesweet (apple), 信区: Linux
: 标 题: 如何从vim里直接编译源代码
: 发信站: BBS 未名空间站 (Sun May 22 04:16:46 2011, 美东)
: 能不能象在emacs里那样,可以编译正在edited 的源文件,上面一个window显示源代码
: ,下面的一个window显示出错信息(errors)?这样可以从出错的地方,直接跳到相应的
: 代码行。
: 在vim里,试了:!gcc -o test test.c
: 还试了:!make (当然了俺做了个makefile)
: vim都是临时跳出到shell,显示编译的出错的信息。这跟自己退出vim,在shell下直接

c*********t
发帖数: 2921
3
问题是如何从external shell里的错误信息直接jump 回到相应的文件中的确切的代码
行?

can

【在 t****t 的大作中提到】
: you can just use :make and it will still call an external shell. but you can
: jump around errors in source files.

t****t
发帖数: 6806
4
just look at your "tool" menu, it's all in there.

【在 c*********t 的大作中提到】
: 问题是如何从external shell里的错误信息直接jump 回到相应的文件中的确切的代码
: 行?
:
: can

b******n
发帖数: 592
5
vim只能顺序的到访问每个错误。:cc显示当前错误,:nc下一个错误。。最好自己bind
到键盘。。

【在 c*********t 的大作中提到】
: 问题是如何从external shell里的错误信息直接jump 回到相应的文件中的确切的代码
: 行?
:
: can

t****t
发帖数: 6806
6
you can show all errors and messages in a separate window and navigate
through it. just look at the tool menu, every command you need is there.

【在 t****t 的大作中提到】
: just look at your "tool" menu, it's all in there.
i*****o
发帖数: 1714
7
directly to the error line in the code window.
b******w
发帖数: 52
8
just map sth as key sequence something like
then use cn,cp,cclose to iterate
c-w c-w to jump
1 (共1页)
进入Programming版参与讨论
相关主题
如何写入版本信息关于Makefile的一个问题
关于反编译make的时候能不能指定某个路径下的ld? (转载)
[合集] 6个变态的C语言写的Hello World (ZZ)c程序用g++编译需要改动么?
如果一个程序的makefile里-c改成-g就链接出错如何把Linux平台下C++源代码转换到 windows平台下编译?
问大家一个C语言编程的小问题One question in C programming
valgrind和purify支持partial build么?关于不同系统编译的问题
any tool to recommend to port c++ code from windows to linuxmakefile 问题请教
Makefile疑问大型程序如何加快编译速度
相关话题的讨论汇总
话题: vim话题: 编译话题: window话题: errors话题: 源代码