emacs 配置C语言环境IDE
用EMACS写C语言
emacs 写C语言
在emacs里,需要安装gcc, 打开文件 C-x C-f, 比如: hello.c 编写:
#include<stdio.h> int main() { printf("hello emacs~ \n"); return 0; }
然后输入:M-X eshell //注意不是shell
gcc -W -o hello hello.c
再运行
./hello 如果是windows下,运行 ./hello.exe
结束后,输入exit,退出,回到hello.c编辑地方,windows下不退出,可以C-X 1,关掉不需要的缓冲; 不管在哪个系统,也可以按 C-x b 来选择需要的缓冲,继续编辑。