0
下面是VIM的提示receipe:輸入H,J,K,L在GTK程序用vi風格的鍵綁定
# /usr/share/themes/Vi/gtk-2.0-key/gtkrc
# A key-binding set for vi-like key-bindings
binding "gtk-vi-text-view"
{
bind "<ctrl>d" { "move-cursor" (display-lines, 5, 0) }
bind "<ctrl>f" { "move-cursor" (display-lines, 5, 0) }
bind "<ctrl>u" { "move-cursor" (display-lines, -5, 0) }
bind "<ctrl>b" { "move-cursor" (display-lines, -5, 0) }
bind "<ctrl>e" { "move-cursor" (display-lines, -1, 0) }
bind "<ctrl>y" { "move-cursor" (display-lines, 1, 0) }
bind "j" { "move-cursor" (display-lines, 1, 0) }
bind "k" { "move-cursor" (display-lines, -1, 0) }
bind "l" { "move-cursor" (logical-positions, 1, 0) }
bind "h" { "move-cursor" (logical-positions, -1, 0) }
}
binding "gtk-vi-tree-view"
{
bind "j" { "move-cursor" (display-lines, 1) }
bind "k" { "move-cursor" (display-lines, -1) }
bind "l" { "move-cursor" (logical-positions, 1) }
bind "h" { "move-cursor" (logical-positions, -1) }
}
class "GtkTextView" binding "gtk-vi-text-view"
class "GtkTreeView" binding "gtk-vi-tree-view"
# The last part is to note your local gtk configuration file. Check in your home directory file named '.gtkrc-2.0'. and "touch" it. The only thing left to be done is appending:
gtk-key-theme="Vi"
這是所有罰款,但問題是,這樣的配置下它不再可能輸入字母 h,j,k和l。這怎麼解決?