
Emacs
PTYX
Android软件工程师
展开
-
emacs中c代码的缩进问题
原文地址:http://www.emacswiki.org/emacs/IndentingC 设置空格代替tab缩进,并且tab宽度为四个空格,同时设置c代码中语句首字母与括号对齐,下面四句话可以解决 (setq default-tab-width 4) (setq-default indent-tabs-mode nil) (setq c-default-style "l转载 2013-07-30 10:26:01 · 7127 阅读 · 0 评论 -
emacs补全
原文地址: http://blog.youkuaiyun.com/astropeak/article/details/6666527 emacs中的补全大致可为三类:前缀补全、模板补全和语义补全。前两种补全可应用于任 何文字的输入,第三种补全只针对具有固定语法的编程语言。默认情况下(不安装任何插 件),emacs提供基本的前缀补全和模板补全功能,虽然这两种补全相对于普通的编辑器 已经能够较为转载 2013-07-24 11:04:33 · 2608 阅读 · 0 评论 -
emacs运行shell命令
原文地址:http://blog.youkuaiyun.com/ruglcc/article/details/7821728 M-! cmd RET:打开一个名为“*Shell Command Output*“的窗口,并把该命令的执行结果显示在其中。按下”C-x 1“组合键可以关闭这个窗口。由于Shell命令的输出是在一个编辑缓冲区里,因此我们可以对它进行编辑、保存等操作。M-| cmd RET转载 2013-07-25 18:52:46 · 2367 阅读 · 0 评论 -
emacs为文件设置本地变量
原文地址:http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html 有空再翻译一下,一个应用的例子: 48.2.4.1 Specifying File Variables There are two ways to specify file l翻译 2013-07-26 14:25:58 · 1875 阅读 · 0 评论 -
yasnippet模板中使用elisp语句
一个简单的用于emacs c++语言本地编译变量设置的yasnippet模板: # name: compile /* compile-command "..." */ # key: compile # -- // Local Variables: // compile-command: "g++ `(buffer-name)` -o `(file-name-sans-extension原创 2013-07-27 00:03:56 · 1257 阅读 · 0 评论