2 # A keybinding set implementing emacs-like keybindings
6 # Bindings for GtkTextView and GtkEntry
8 binding "gtk-emacs-text-entry"
10 bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
11 bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
12 bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
13 bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }
15 bind "<alt>b" { "move-cursor" (words, -1, 0) }
16 bind "<shift><alt>b" { "move-cursor" (words, -1, 1) }
17 bind "<alt>f" { "move-cursor" (words, 1, 0) }
18 bind "<shift><alt>f" { "move-cursor" (words, 1, 1) }
20 bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
21 bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
22 bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
23 bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }
25 bind "<ctrl>w" { "cut-clipboard" () }
26 bind "<ctrl>y" { "paste-clipboard" () }
28 bind "<ctrl>d" { "delete-from-cursor" (chars, 1) }
29 bind "<alt>d" { "delete-from-cursor" (word-ends, 1) }
30 bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) }
31 bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) }
33 bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
34 "insert-at-cursor" (" ") }
35 bind "<alt>KP_Space" { "delete-from-cursor" (whitespace, 1)
36 "insert-at-cursor" (" ") }
40 # Bindings for GtkTextView
42 binding "gtk-emacs-text-view"
44 bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) }
45 bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) }
46 bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) }
47 bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) }
49 bind "<ctrl>space" { "set-anchor" () }
50 bind "<ctrl>KP_Space" { "set-anchor" () }
54 # Bindings for GtkTreeView
56 binding "gtk-emacs-tree-view"
58 bind "<ctrl>s" { "start-interactive-search" () }
59 bind "<ctrl>f" { "move-cursor" (logical-positions, 1) }
60 bind "<ctrl>b" { "move-cursor" (logical-positions, -1) }
63 class "GtkEntry" binding "gtk-emacs-text-entry"
64 class "GtkTextView" binding "gtk-emacs-text-entry"
65 class "GtkTextView" binding "gtk-emacs-text-view"
66 class "GtkTreeView" binding "gtk-emacs-tree-view"