LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 719|回复: 0

让emacs无所不在

[复制链接]
发表于 2008-10-22 08:02:44 | 显示全部楼层 |阅读模式
习惯了emacs的文本编辑模式后总会希望其他程序的文本输入区域也支持emacs键。其实gtk程序要实现这个功能很简单。

gnome: 打开gconf-editor,找到/desktop/gnome/interface/gtk_key_theme,把它设成Emacs即可,立时生效。包括firefox的地址栏、文本输入框,nautilus的地址栏,gedit,leafpad等等等等都支持基本emacs键。
Ctrl+A Move cursor to beginning of line
Ctrl+B Go left one character
Ctrl+D Delete character following/under cursor
Ctrl+E Move cursor to end of line
Ctrl+F Go right one character
Ctrl+H Delete character, left (backspace)
Ctrl+K Delete from cursor to end of line
Ctrl+N Go to next line ("down") (only works in multiline text areas)
Ctrl+P Go to previous line ("up") (only works in multiline text areas)
Ctrl+U Delete current line
Ctrl+W Cut to clipboard
Ctrl+Y Paste from clipboard
Ctrl+Space Set mark
Ctrl+Del, Alt+D Delete from cursor to end of word
Ctrl+Backspace Delete from cursor to start of word
Ctrl+/ Select all
Alt+F Move forward one word
Alt+B Move backward one word
Alt+Space Delete all whitespace around cursor, reinsert single space
Alt+\ Delete all whitespace around cursor
为了不受默认快捷键干扰,如^A,必须将 /desktop/gnome/interface/can_change_accels 键设成 true。
非gnome的,将 gtk-key-theme-name = "Emacs" 写入~/.gtkrc-2.0即可。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表