1 # Based on /usr/share/themes/Emacs/gtk-2.0-key/,
2 # modified by Zack for matita
5 # A keybinding set implementing emacs-like keybindings
9 # Bindings for GtkTextView and GtkEntry
11 binding "gtk-emacs-text-entry"
13 bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
14 bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
15 bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
16 bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }
18 bind "<alt>b" { "move-cursor" (words, -1, 0) }
19 bind "<shift><alt>b" { "move-cursor" (words, -1, 1) }
20 bind "<alt>f" { "move-cursor" (words, 1, 0) }
21 bind "<shift><alt>f" { "move-cursor" (words, 1, 1) }
23 bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
24 bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
25 bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
26 bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }
28 bind "<ctrl>w" { "cut-clipboard" () }
29 bind "<ctrl>y" { "paste-clipboard" () }
31 bind "<ctrl>d" { "delete-from-cursor" (chars, 1) }
32 bind "<alt>d" { "delete-from-cursor" (word-ends, 1) }
33 bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) }
34 bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) }
36 bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
37 "insert-at-cursor" (" ") }
38 bind "<alt>KP_Space" { "delete-from-cursor" (whitespace, 1)
39 "insert-at-cursor" (" ") }
42 # Some non-Emacs keybindings people are attached to
45 "move-cursor" (paragraph-ends, -1, 0)
46 "delete-from-cursor" (paragraph-ends, 1)
48 bind "<ctrl>h" { "delete-from-cursor" (chars, -1) }
49 bind "<ctrl>w" { "delete-from-cursor" (word-ends, -1) }
53 # Bindings for GtkTextView
55 binding "gtk-emacs-text-view"
57 # bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) }
58 bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) }
59 # bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) }
60 bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) }
62 bind "<ctrl>space" { "set-anchor" () }
63 bind "<ctrl>KP_Space" { "set-anchor" () }
67 # Bindings for GtkTreeView
69 binding "gtk-emacs-tree-view"
71 bind "<ctrl>s" { "start-interactive-search" () }
72 bind "<ctrl>f" { "move-cursor" (logical-positions, 1) }
73 bind "<ctrl>b" { "move-cursor" (logical-positions, -1) }
76 class "GtkEntry" binding "gtk-emacs-text-entry"
77 class "GtkTextView" binding "gtk-emacs-text-entry"
78 class "GtkTextView" binding "gtk-emacs-text-view"
79 class "GtkTreeView" binding "gtk-emacs-tree-view"