]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/matita.gtkrc
ocaml 3.09 transition
[helm.git] / helm / matita / matita.gtkrc
1 # Based on /usr/share/themes/Emacs/gtk-2.0-key/,
2 # modified by Zack for matita
3
4 #
5 # A keybinding set implementing emacs-like keybindings
6 #
7
8 #
9 # Bindings for GtkTextView and GtkEntry
10 #
11 binding "gtk-emacs-text-entry"
12 {
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) }
17
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) }
22
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) }
27
28   bind "<ctrl>w" { "cut-clipboard" () }
29   bind "<ctrl>y" { "paste-clipboard" () }
30
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) }
35
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" (" ")  }
40
41   #
42   # Some non-Emacs keybindings people are attached to
43   #
44   bind "<ctrl>u" {
45      "move-cursor" (paragraph-ends, -1, 0)
46      "delete-from-cursor" (paragraph-ends, 1)
47   }
48   bind "<ctrl>h" { "delete-from-cursor" (chars, -1) }
49   bind "<ctrl>w" { "delete-from-cursor" (word-ends, -1) }
50 }
51
52 #
53 # Bindings for GtkTextView
54 #
55 binding "gtk-emacs-text-view"
56 {
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) }
61
62   bind "<ctrl>space" { "set-anchor" () }
63   bind "<ctrl>KP_Space" { "set-anchor" () }
64 }
65
66 #
67 # Bindings for GtkTreeView
68 #
69 binding "gtk-emacs-tree-view"
70 {
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) }
74 }
75
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"
80