随笔分类 -  编辑工具

摘要:Emacs 的基本操作Emacs 中的光标移动C-f 光标前进一个字符C-b 光标后退一个字符C-p 上移一行C-n 下移一行M-f 前进一个单词M-b 后退一个单词C-a 行首C-e 行尾M-a 句首M-e 句尾M-{ 上一个段落M-} 下一个段落C-v 屏幕上卷一个屏M-v 屏幕下卷一个屏C-M-v 另一个窗口下卷一个屏幕C-M-V 另一个窗口上卷一个屏幕M-< 文件头M-> 文件尾C-u n 或 M-n 重复执行n次后继命令Emacs中的删除C-d ... 阅读全文
posted @ 2012-08-30 15:25 Jack204 阅读(391) 评论(0) 推荐(0)
摘要:Simple Emacs ConfigurationC source code indent(setq-default c-basic-offset 4)Change Major modeM-x obj-mode / M-x c-mode / M-x java-modeUsing AbbreviationsEmacs can automatically correct your spelling mistake as you type (such as correcting "thier" with "their"), or expand your ow 阅读全文
posted @ 2012-02-14 16:14 Jack204 阅读(368) 评论(0) 推荐(0)
摘要:Q:My usual tools are Emacs with g++ on a Linux system to implement my research algorithms. For the last some years, I have used emacs in a fairly basic way. I open C or C++ files, edit them with a syntax highlighting scheme of my choice and compile and do other stuff from within emacs (or maybe from 阅读全文
posted @ 2012-02-07 14:31 Jack204 阅读(320) 评论(0) 推荐(0)
摘要:这次的基本配置主要包括: 调整emacs的c的编辑模式indent的长度,在.emacs中加入:(setq-default c-basic-offset 8 tab-width 8 indent-tabs-mode t) 调整color-theme,在将color-theme要求的安装包放到.emacs.d的customer的文件夹中,并将~/.emacs.d/customer加入emacs的load-path中,在~/.emacs中加入:(require 'color-theme) (color-theme-initi... 阅读全文
posted @ 2011-10-14 20:53 Jack204 阅读(214) 评论(0) 推荐(0)
摘要:< Virtual terminals >Ctrl + Alt + F1 Switch to the first virtual terminal. In Linux, you can have several virtual terminals at the same time. The default is 6.Ctrl + Alt + Fn Switch to the nth virtual terminal. Because the number of virtual terminals is 6 by default, n = 1...6.tty Typing the t 阅读全文
posted @ 2011-09-27 21:48 Jack204 阅读(499) 评论(0) 推荐(0)
摘要:1 进行多行替换前首先要决定在哪几行替换?先选定多行,再按':',则默认命令是在选中的行进行操作。比如先‘v’进入visual模式,选定这几行。然后按‘:’进入命令模式,再象下面说的打上要进行的替换操作,点击‘RET’。先点击‘:’,进入命令模式再手动写需要操作哪几行。比如:1,4---代表对1到4行进行替换。4,$----代表对4到行尾进行替换。2 如何进行替换?基本命令形式:range s/.../.../g -----其中‘...’代表省略号。高级的用法需要学习Linux里面的正则表达式。下面说几种比较特殊常用的形式:替换行首:s/^/.../g ---------在行首 阅读全文
posted @ 2011-09-02 16:20 Jack204 阅读(7092) 评论(0) 推荐(0)