找回密码
 注册
搜索
热搜: 回贴
微赢网络技术论坛 门户 服务器 Linux/BSD 查看内容

emacs 的补充命令

2009-12-20 13:18| 发布者: admin| 查看: 47| 评论: 0|原作者: 夙瑶


1、Emacs 's repeat:
用来重复执行指令: C-u 3 C-x u (表明重复执行undo三次)
也等于: M-3 C-x u
(其中 C-u 3 = M-3)
C-u 1 0 C-x u (执行undo 10次) = M-1 0 C-x u
2、其实 C-u num 和 M-num 都是给Emacs 传递参数
eg: M-9 C-c g 表示goto-line 9
//我是将goto-line bingding 到了 C-c g, 默认是M-g g
3. Emacs man mode
发现这个mode还是很好用的。
启动方式: M-x man, 然后输入: 2 write //这样就相当与 man 2 write
不过,我绑定到了C-c m
(global-set-key [?\C-c ?m] 'man)
man mode的一些快捷键

n Jump to next manpage section.

p Jump to previous manpage section.

m Prompt to retrieve a new manpage.
q Deletes the manpage window, bury its buffer.
k Deletes the manpage window, kill its buffer.
s Jumps to the SEE ALSO manpage section. 注意搜索不是用这个,而是通用的 C-s, C-r



4. scroll 相关的一些:

C-v : scroll-up
M-v : scroll-down
C-x > : scroll-right
C-x
5. 关于Emacs的'shell
以前一直用的M-x shell,发现是很理想。
现在发现 eshell要好多了。 不过还是不能够clear, 用如下function就可以:
;; eshell 中的clear命令
(defun eshell/clear ()
"to clear the eshell buffer."
(interactive)
(let ((inhibit-read-only t))
(erase-buffer)))
当然可以用M-x term, M-x terminal-emulator. 不过我还是觉得eshell好, 因为M-x term中 char-mode下的C-x 都变成了 C-c, 还是有点不太习惯。。。
6: focus minibuf 的问题:
有时发现重新focus minibuf却没有对应的函数(也许是我没找到)。
只有通过windmove做到了。











最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 23:32 , Processed in 0.089976 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部