/usr/share/gps/library/emacs.xml is in gnat-gps-common 5.3dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | <?xml version="1.0" ?>
<!-- Provides Emacs-like keybindings.
This file overrides a number of the standard keybindings in GPS, to
be as close as possible to the Emacs editor.
No additional feature is provided in this package, and therefore you
can easily use for instance the interactive search even if you do not
like the Emacs key shortcuts.
For best emulation of Emacs, it is recommanded that you also load the
following startup scripts:
- navigation_utils.py
- text_utils.py
- execute_extended.py
- isearch.py
- rectangles.py
You can override any of these key shortcuts through the menu
/Edit/Key Shortcuts.
See the source of this script for the full list of key shortcuts.
-->
<GPS>
<!-- disable GPS key shortcuts which conflict with emacs shortcuts -->
<key action="/Edit/Smart Completion" />
<key action="">control-x</key>
<key action="">control-c</key>
<!-- define key shortcuts -->
<key action="subprogram box">control-c n</key>
<key action="kill line">control-k</key>
<key action="kill forward">control-d</key>
<key action="Delete word forward">alt-d</key>
<key action="transpose chars">control-t</key>
<key action="Transpose lines">control-x control-t</key>
<key action="/File/Save">control-x control-s</key>
<key action="/File/Save As..." >control-x control-w</key>
<key action="goto beginning of line">control-a</key>
<key action="goto end of line">control-e</key>
<key action="goto beginning of buffer">alt-less</key>
<key action="goto end of buffer">alt-shift-greater</key>
<key action="Format selection" >tab</key>
<key action="/File/Open...">control-x control-f</key>
<key action="/Edit/Undo">control-_</key>
<key action="/Edit/Refill">alt-q</key>
<key action="repeat next">control-u</key>
<key action="goto declaration or body">control-c control-d</key>
<key action="goto other file">control-c o</key>
<key action="/Navigate/Back">control-c control-s</key>
<key action="open line">control-o</key>
<key action="Join line">alt-j</key>
<key action="Upper case word">alt-u</key>
<key action="Lower case word">alt-l</key>
<key action="Capitalize word">alt-c</key>
<key action="/Navigate/Goto Line...">alt-g</key>
<key action='zap to char'>alt-z</key>
<key action='just one space'>alt-space</key>
<key action="set mark command">control-space</key>
<key action="Cancel mark command">control-g</key>
<key action="execute extended command">alt-x</key>
<key action="/Edit/Paste">control-y</key>
<key action="/Edit/Paste Previous">alt-y</key>
<key action="/Edit/Copy">alt-w</key>
<key action="/Edit/Cut">control-w</key>
<key action="Macro Start Keyboard">control-x parenleft</key>
<key action="Macro Stop">control-x parenright</key>
<key action="Macro Play">control-x e</key>
<key action="/Edit/Undo">shift-control-underscore</key>
<key action="/File/Close">control-x k</key>
<key action="/File/Exit">control-x control-c</key>
<key action="/Navigate/Find or Replace...">control-s</key>
<key action="delete horizontal space">alt-backslash</key>
<key action="New View Vertical">control-x 2</key>
<key action="New View Horizontal">control-x 3</key>
<key action="Move to next window">control-x control-b</key>
<key action="Move to previous window" />
<key action="Select other window">control-x o</key>
<key action="Center cursor on screen">control-l</key>
<key action="Delete word backward">alt-BackSpace</key>
<key action="Move to previous word">alt-Left</key>
<key action="Move to next word">alt-Right</key>
<key action="Move to previous page">alt-v</key>
<key action="Move to next page">control-v</key>
<key action="/Edit/Rectangle/Cut">control-x r k</key>
<key action="/Edit/Rectangle/Paste">control-x r y</key>
<key action="/Edit/Rectangle/Delete">control-x r d</key>
<key action="/Edit/Rectangle/Clear">control-x r c</key>
<key action="/Edit/Rectangle/Open">control-x r o</key>
<key action="/Edit/Rectangle/Replace with Text">control-x r t</key>
<key action="/Navigate/Find Incremental">control-s</key>
<key action="/Navigate/Find Previous Incremental">control-r</key>
</GPS>
|