diakonos 0.8.11 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +433 -0
  3. data/LICENCE.md +675 -0
  4. data/bin/diakonos +6 -0
  5. data/diakonos-256-colour.conf +220 -0
  6. data/diakonos.conf +1802 -0
  7. data/help/about-help.dhf +31 -0
  8. data/help/clipboard.dhf +45 -0
  9. data/help/close-file.dhf +6 -0
  10. data/help/code-block-navigation.dhf +16 -0
  11. data/help/column-markers.dhf +15 -0
  12. data/help/config.dhf +69 -0
  13. data/help/cursor-stack.dhf +19 -0
  14. data/help/delete.dhf +41 -0
  15. data/help/extensions.dhf +125 -0
  16. data/help/file-type.dhf +24 -0
  17. data/help/key-mapping.dhf +127 -0
  18. data/help/line-numbers.dhf +22 -0
  19. data/help/macros.dhf +27 -0
  20. data/help/new-file.dhf +6 -0
  21. data/help/open-file.dhf +21 -0
  22. data/help/quit.dhf +7 -0
  23. data/help/resizing.dhf +19 -0
  24. data/help/ruby.dhf +17 -0
  25. data/help/save-file.dhf +10 -0
  26. data/help/scripting.dhf +92 -0
  27. data/help/search.dhf +103 -0
  28. data/help/shell.dhf +60 -0
  29. data/help/speed.dhf +23 -0
  30. data/help/support.dhf +15 -0
  31. data/help/switch-buffers.dhf +15 -0
  32. data/help/tabs.dhf +36 -0
  33. data/help/undo.dhf +9 -0
  34. data/help/uninstall.dhf +18 -0
  35. data/help/welcome.dhf +32 -0
  36. data/help/word-wrap.dhf +17 -0
  37. data/lib/diakonos/about.rb +69 -0
  38. data/lib/diakonos/bookmark.rb +46 -0
  39. data/lib/diakonos/buffer/bookmarking.rb +47 -0
  40. data/lib/diakonos/buffer/cursor.rb +335 -0
  41. data/lib/diakonos/buffer/delete.rb +170 -0
  42. data/lib/diakonos/buffer/display.rb +356 -0
  43. data/lib/diakonos/buffer/file.rb +157 -0
  44. data/lib/diakonos/buffer/indentation.rb +175 -0
  45. data/lib/diakonos/buffer/searching.rb +552 -0
  46. data/lib/diakonos/buffer/selection.rb +360 -0
  47. data/lib/diakonos/buffer/undo.rb +73 -0
  48. data/lib/diakonos/buffer-hash.rb +60 -0
  49. data/lib/diakonos/buffer-management.rb +59 -0
  50. data/lib/diakonos/buffer.rb +698 -0
  51. data/lib/diakonos/clipboard-klipper-dbus.rb +62 -0
  52. data/lib/diakonos/clipboard-klipper.rb +62 -0
  53. data/lib/diakonos/clipboard-osx.rb +59 -0
  54. data/lib/diakonos/clipboard-xclip.rb +60 -0
  55. data/lib/diakonos/clipboard.rb +47 -0
  56. data/lib/diakonos/config-file.rb +67 -0
  57. data/lib/diakonos/config.rb +381 -0
  58. data/lib/diakonos/core-ext/enumerable.rb +15 -0
  59. data/lib/diakonos/core-ext/hash.rb +60 -0
  60. data/lib/diakonos/core-ext/object.rb +6 -0
  61. data/lib/diakonos/core-ext/regexp.rb +6 -0
  62. data/lib/diakonos/core-ext/string.rb +122 -0
  63. data/lib/diakonos/ctag.rb +28 -0
  64. data/lib/diakonos/cursor.rb +27 -0
  65. data/lib/diakonos/display/format.rb +75 -0
  66. data/lib/diakonos/display.rb +336 -0
  67. data/lib/diakonos/extension-set.rb +49 -0
  68. data/lib/diakonos/extension.rb +34 -0
  69. data/lib/diakonos/finding.rb +40 -0
  70. data/lib/diakonos/functions/basics.rb +34 -0
  71. data/lib/diakonos/functions/bookmarking.rb +61 -0
  72. data/lib/diakonos/functions/buffers.rb +489 -0
  73. data/lib/diakonos/functions/clipboard.rb +70 -0
  74. data/lib/diakonos/functions/cursor.rb +264 -0
  75. data/lib/diakonos/functions/grepping.rb +83 -0
  76. data/lib/diakonos/functions/indentation.rb +71 -0
  77. data/lib/diakonos/functions/readline.rb +93 -0
  78. data/lib/diakonos/functions/search.rb +179 -0
  79. data/lib/diakonos/functions/selection.rb +98 -0
  80. data/lib/diakonos/functions/sessions.rb +78 -0
  81. data/lib/diakonos/functions/shell.rb +250 -0
  82. data/lib/diakonos/functions/tags.rb +65 -0
  83. data/lib/diakonos/functions/text-manipulation.rb +196 -0
  84. data/lib/diakonos/functions-deprecated.rb +77 -0
  85. data/lib/diakonos/functions.rb +292 -0
  86. data/lib/diakonos/grep.rb +98 -0
  87. data/lib/diakonos/help.rb +47 -0
  88. data/lib/diakonos/hooks.rb +13 -0
  89. data/lib/diakonos/installation.rb +19 -0
  90. data/lib/diakonos/interaction-handler.rb +216 -0
  91. data/lib/diakonos/interaction.rb +52 -0
  92. data/lib/diakonos/key-map.rb +62 -0
  93. data/lib/diakonos/keying.rb +442 -0
  94. data/lib/diakonos/line-mover.rb +42 -0
  95. data/lib/diakonos/list.rb +59 -0
  96. data/lib/diakonos/logging.rb +27 -0
  97. data/lib/diakonos/mode.rb +17 -0
  98. data/lib/diakonos/mouse.rb +18 -0
  99. data/lib/diakonos/number-fitter.rb +11 -0
  100. data/lib/diakonos/range.rb +31 -0
  101. data/lib/diakonos/readline/functions.rb +82 -0
  102. data/lib/diakonos/readline.rb +222 -0
  103. data/lib/diakonos/search.rb +58 -0
  104. data/lib/diakonos/sessions.rb +257 -0
  105. data/lib/diakonos/sized-array.rb +48 -0
  106. data/lib/diakonos/text-mark.rb +19 -0
  107. data/lib/diakonos/vendor/fuzzy_file_finder.rb +365 -0
  108. data/lib/diakonos/version.rb +25 -0
  109. data/lib/diakonos/window.rb +43 -0
  110. data/lib/diakonos.rb +592 -0
  111. metadata +160 -68
@@ -0,0 +1,31 @@
1
+ # Diakonos Help
2
+
3
+ Welcome to the Diakonos help system! To learn more about how to use Diakonos,
4
+ type in some keywords as if you were searching the Internet. Diakonos will
5
+ show the titles of matching help documents. Use the arrow keys to choose a
6
+ document, and press Enter to read it.
7
+
8
+ If you're not sure what keywords to type, you can type a partial word and
9
+ press <Tab> to see a list of tags that start with what you typed. Or,
10
+ advanced users can prefix the search with a slash (/) and a full-document,
11
+ regular expression search will be performed. Type a slash by itself to see a
12
+ list of all help documents.
13
+
14
+ The documentation is written using the default key chords and sequences. As
15
+ such, please be aware that the documentation may not correspond to your
16
+ actual setup if the keyboard configuration has been changed (by you, or
17
+ someone else, such as a system administrator).
18
+
19
+ When you are finished reading a document, close it with the close file key
20
+ chord, <Ctrl-W>.
21
+
22
+ To abort your search for help and close the help system, press <Esc> twice.
23
+
24
+ ## Diakonos Help Files
25
+
26
+ The help documents are normal files, and are opened just like other files in
27
+ Diakonos. You can copy code examples and configuration lines out of them
28
+ and paste them in other buffers. You can even create your own files (with a
29
+ .dhf extension) and place them alongside the default help files.
30
+
31
+ Tags: diakonos help usage support
@@ -0,0 +1,45 @@
1
+ # The Clipboard
2
+
3
+ To select text, press <Ctrl-space>. This marks (or "anchors") one end of the
4
+ text you wish to select. Use any movement keys (such as the arrow keys) to move the
5
+ cursor to the other end of the text you wish to select. As you do so, you will see
6
+ the selection grow, being highlighted in a different colour. To work with the
7
+ selection, press one of the following key chords:
8
+
9
+ <Ctrl-C> to copy
10
+ <Ctrl-X> to cut
11
+ <Ctrl-V> to paste
12
+ <Alt-U> to unselect the text
13
+
14
+ Diakonos also lets you cut one or more lines of text without needing to
15
+ delineate a selection. Pressing <Ctrl-K> once cuts the current line and
16
+ places it in the clipboard. You can press <Ctrl-K> more times to cut and add
17
+ more lines.
18
+
19
+ <Ctrl-Alt-K> will cut from the cursor to the end of the current line.
20
+
21
+ Diakonos also supports synchronization with Klipper, the KDE clipboard
22
+ manager. This requires DCOP to be installed. Uncomment the indicated line
23
+ in the configuration file. Alternatively, synchronization with the X
24
+ clipboard can be accomplished with xclip (third-party software). Uncomment
25
+ the xclip line for xclip usage.
26
+
27
+ ## Block Selection
28
+
29
+ Diakonos supports block selection. This allows you to select and work with
30
+ rectangular highlighted areas instead of selecting text the usual way (as a
31
+ left-to-right flow of characters).
32
+
33
+ To change to block selection mode, press <Alt-Shift-M,B>. The status line will
34
+ indicate "block" mode. To change to normal selection mode, press
35
+ <Alt-Shift-M,N>. Mnemonic: M for Mark, B for Block, N for Normal.
36
+
37
+ ## Advanced Selection
38
+
39
+ Press <Alt-space> to select the current code block. That is, the lines which
40
+ are at the same depth of indentation as the current line. Press <Alt-space>
41
+ more times to select each successive parent block (i.e., lines at shallower
42
+ levels of indentation).
43
+
44
+
45
+ Tags: clipboard copy cut paste kde klipper dcop select selecting selection selected unselect unselecting mark marking highlight eol line block column
@@ -0,0 +1,6 @@
1
+ # Closing a File
2
+
3
+ Press <Ctrl-W> to close the current file. Help documents and error messages
4
+ are also files, and are closed with <Ctrl-W>.
5
+
6
+ Tags: close closing file files buffer buffers
@@ -0,0 +1,16 @@
1
+ # Code Block Navigation
2
+
3
+ Using <Ctrl-PageDown>, you can jump to the next code block of the same
4
+ indentation level as the current line. <Ctrl-PageUp> goes back in the opposite
5
+ direction (up or previous block). You might use this to easily browse: the
6
+ methods of a class; or the different 'when' clauses of a Ruby case expression; or
7
+ the components of an if-elsif-else tree; or the rules of a CSS stylesheet; and
8
+ so on. Diakonos will automatically limit the extent of the navigation, so if
9
+ you start your browsing within an if-elsif tree, your cursor won't jump outside
10
+ that tree if you press <Ctrl-PageDown> too many times.
11
+
12
+ <Alt-PageDown> brings the cursor one block level deeper; <Alt-PageUp> brings
13
+ you out one level.
14
+
15
+
16
+ Tags: code block navigation navigate move moving movement jump jumping cursor
@@ -0,0 +1,15 @@
1
+ # Column Markers
2
+
3
+ You can define column markers using the view.column_markers.* settings. You
4
+ might use a column marker as a visual cue to help you not exceed a certain line
5
+ length. You can set up as many column markers as you like.
6
+
7
+ ## Example of a column marker
8
+
9
+ view.column_markers.margin.column 80
10
+ view.column_markers.margin.format 9
11
+
12
+ Adding these lines to your configuration would set up a column marker named
13
+ 'margin'. The name 'margin' is arbitrary; use whatever string you want for your
14
+ markers. The 'margin' marker would highlight the 80th column using the format
15
+ code 9 (white on red in the default 16-colour configuration).
data/help/config.dhf ADDED
@@ -0,0 +1,69 @@
1
+ # Configuring Diakonos
2
+
3
+ ## Personal configuration
4
+
5
+ Press <F12> to open your personal Diakonos configuration file, which is
6
+ ~/.diakonos/diakonos.conf . Read the comments in the file for information on
7
+ the individual settings. Edit the file as you like. When you save the file,
8
+ your changes take effect immediately in your current session.
9
+
10
+ Your personal configuration remains separate from the system-wide
11
+ configuration, located elsewhere. Your personal settings take precedence over
12
+ system configuration where there is any difference or discrepancy.
13
+
14
+ ## Saving configuration changes
15
+
16
+ Since configuring Diakonos is nothing but editing and saving the configuration
17
+ file, to stop configuring, simply switch buffers or close the configuration
18
+ file (with <Ctrl-W>).
19
+
20
+ ## Configuration file format
21
+
22
+ Each line in the configuration file has a setting identifier and the value of
23
+ the setting, for example:
24
+
25
+ lang.text.format.default white
26
+
27
+ The identifier and the value are separated by one or more spaces.
28
+ Previous versions of Diakonos used a semicolon to separate; this is still
29
+ permitted, but may not be in future versions.
30
+
31
+ Comments can be placed in the file by starting a line with an octothorpe
32
+ character (#).
33
+
34
+ ## Including other configuration files
35
+
36
+ You can create and include custom configuration files which remain distinct
37
+ from your standard default configuration file. You can place these files
38
+ wherever you like, but it is recommended to put them in ~/.diakonos. Then,
39
+ place a line like this at the bottom of the default configuration file:
40
+
41
+ include ~/.diakonos/extra.conf
42
+
43
+ If a setting is specified again (whether in the same file, or an included
44
+ file), it overrides the previous setting given higher up in the configuration
45
+ file(s). Note that editing and saving custom configuration files which reside
46
+ outside of ~/.diakonos will not cause the changes to be automatically loaded
47
+ like they are with configuration files in ~/.diakonos. To reload all
48
+ configuration files, quit and restart Diakonos, or press <Shift-F2> and type
49
+ "load_configuration".
50
+
51
+ ## Configuration inheritance
52
+
53
+ Configuration settings can be inherited (cascaded). Simply use an equals sign
54
+ (=) to set one setting to the value of another.
55
+
56
+ one.setting = another.setting
57
+
58
+ For an example, have a look at the Ruby language definition in the default
59
+ configuration file. See how the shared settings are defined earlier in the
60
+ file, then used later on in the Ruby language configuration.
61
+
62
+ Inheritance will work for any setting, not just formatting. The important
63
+ thing to remember is that Diakonos will parse configuration files top to
64
+ bottom, and visit each included file in the order the include directives are
65
+ encountered, with a depth-first strategy. So you should define ancestor
66
+ settings before descendant settings.
67
+
68
+
69
+ Tags: diakonos config configure configuration configuring setup setting settings options option preferences
@@ -0,0 +1,19 @@
1
+ # The Cursor Stack
2
+
3
+ The cursor stack is just like the Back and Forward functionality of your web
4
+ browser. Diakonos semi-intelligently keeps track of the places where you do
5
+ work. Using the cursorReturn command (<Ctrl-J>), you can return to previous
6
+ work areas. Use <Ctrl-L> to go forward through the stack.
7
+
8
+ Here is an example of a common scenario:
9
+
10
+ 1. you are editing in some location
11
+ 2. you need to examine some other code (such as the definition of a method)
12
+ elsewhere in the file
13
+ 3. you page through the file, or search for text
14
+ 4. after examining the code there, possibly copying material to the clipboard,
15
+ 5. you press <Ctrl-J> and return to the exact location you were working in prior
16
+ to your search
17
+
18
+
19
+ Tags: cursor stack move movement jump jumping moving remember previous position next back forward browser web bookmark bookmarks bookmarking webbrowser page file search return clipboard
data/help/delete.dhf ADDED
@@ -0,0 +1,41 @@
1
+ # Deleting Text
2
+
3
+ ## Common Deletion
4
+
5
+ Diakonos behaves just as you would expect when you press <Delete> or
6
+ <Backspace>; they delete the current and previous character respectively.
7
+
8
+ When text is selected, pressing <Delete> or <Backspace> will delete the
9
+ selected text. Selecting text and then typing (or pasting) will also delete
10
+ the selected text (and then process what was typed or pasted).
11
+
12
+ ## Deleting a Line
13
+
14
+ <Ctrl-K> will delete the current line, regardless of where on the line the
15
+ cursor is.
16
+
17
+ ## Deleting Part of a Line
18
+
19
+ <Ctrl-Alt-K> will delete all the text from the cursor to the end of the current
20
+ line.
21
+
22
+ You can delete from the cursor up to a certain character by pressing <Ctrl-D-T>
23
+ (mnemonic: "Delete Till"). Diakonos will prompt you for a character, and then
24
+ delete everything from the cursor to the first instance of that character to
25
+ the right of the cursor. For example, pressing <Ctrl-D-T-.> will delete up to
26
+ the next period.
27
+
28
+ You can delete all text in between a pair of the same character by pressing
29
+ <Ctrl-D-I> (mnemonic: "Delete Inside" or "Delete In Between"). Diakonos will
30
+ prompt you for a character, and then delete between the closest pair of that
31
+ character. For example, situating the cursor inside a string inside some
32
+ source code, then pressing <Ctrl-D-I-"> will deleted the contents of the
33
+ string. That is:
34
+
35
+ my_string = "this is a string"
36
+
37
+ would become
38
+
39
+ my_string = ""
40
+
41
+ Tags: delete deleting text deletion remove removal removing line
@@ -0,0 +1,125 @@
1
+ # Extending Diakonos
2
+
3
+ Diakonos has a simple but powerful extension system. Extensions are written in
4
+ Ruby (http://www.ruby-lang.org).
5
+
6
+
7
+ ## Installing and Uninstalling Extensions
8
+
9
+ ### Unpack/Clone
10
+
11
+ Extensions are installed in ~/.diakonos/extensions/. Each extension should
12
+ have its own subdirectory under there. Extension tarballs or repository clones
13
+ should be unpacked or cloned under there.
14
+
15
+ ### Load
16
+
17
+ Once an extension is installed into ~/.diakonos/extensions/, you activate it
18
+ by adding a command to your configuration:
19
+
20
+ load_extension name_of_the_extension
21
+
22
+ Diakonos will load extensions at startup, and will reload extensions whenever
23
+ the Diakonos configuration is updated.
24
+
25
+ ### Unload
26
+
27
+ To deactivate an extension, simply remove (or comment out) all load_extension
28
+ directives from your configuration which load the extension.
29
+
30
+ ### Uninstall
31
+
32
+ Extensions can be removed cleanly by deleting the extension's subdirectory out
33
+ of ~/.diakonos/extensions/.
34
+
35
+
36
+ ## Extension Format
37
+
38
+ ### Directory Structure
39
+
40
+ A Diakonos extension consists of a directory (or directory tree) of files:
41
+
42
+ info.yaml
43
+ *.conf
44
+ *.rb
45
+
46
+ The simplest extension will have nothing but an info.yaml file. This "empty"
47
+ extension will do nothing useful, though, of course.
48
+
49
+ Diakonos will parse and load all configuration files (*.conf) in the root of
50
+ the extension's directory. All Ruby files (*.rb) found in the extension's
51
+ directory, or any subdirectory underneath it, are loaded and executed at
52
+ startup, and on configuration change. Typically, an extension will only have
53
+ one configuration file, but it may have any number of Ruby files.
54
+
55
+ ### Information File
56
+
57
+ To be valid, an extension must have a properly-formatted info.yaml file. As
58
+ the filename suggests, info.yaml is a YAML file. It consists of several keys,
59
+ and a few arrays, described below.
60
+
61
+ The diakonos key is required. It is strongly recommended to have name, uris
62
+ and version keys. The other keys are optional.
63
+
64
+ name: (recommended) The name of the extension.
65
+
66
+ description: (optional) A brief, one-line description of the extension.
67
+
68
+ author: (optional) Several subkeys provide information about the extension's author.
69
+ name: The author's name or nickname.
70
+ email: The author's email address.
71
+ uri: A URI associated with the author. This might be a homepage, or a blog.
72
+
73
+ version: (recommended) The version of the extension.
74
+
75
+ uris: (recommended)
76
+ homepage: The website giving more information about the extension.
77
+ repository: The URI of the extension's source code repository. This should
78
+ be a URI that can be used with version control software, and so might
79
+ begin with "svn://" or "git://".
80
+
81
+ licence: (optional) The licence of the extension's source code.
82
+
83
+ requirements: (required) Several subkeys tell diakonos about what versions of
84
+ things the extension works with.
85
+ diakonos: (required) Several subkeys tell Diakonos about what versions of
86
+ Diakonos the extension works with.
87
+ minimum: The minimum version of Diakonos required for the extension to
88
+ function properly.
89
+ tested: A list of Diakonos versions which the extension is known to run
90
+ under.
91
+ gems: (optional) If the extension needs any gems to function, they should be
92
+ listed here, with their minimum and tested versions given.
93
+
94
+ notes: (optional) Longer text describing the extension, its capabilities and
95
+ its usage. For multiple paragraphs, use the YAML syntax "notes: >", and
96
+ indent the paragraphs to the same level.
97
+
98
+
99
+ ## Extension Code
100
+
101
+ Extension code is any valid Ruby code. See
102
+ http://rdoc.info/projects/Pistos/diakonos
103
+ for source code documentation for Diakonos, and
104
+ http://github.com/Pistos/diakonos/tree/master/extensions/dk-hello-world
105
+ for an example of an extension.
106
+
107
+ To have code execute on keypress, define a method in the Diakonos::Functions
108
+ module. All methods in Diakonos::Functions are exposed to the keying system,
109
+ any method name can be referred to by the key directive in configuration files.
110
+
111
+ Methods of Diakonos::Functions are run within the context of the main
112
+ ::Diakonos::Diakonos object. In this context, you get access to all of the
113
+ instance variables. Some variables of note:
114
+
115
+ @current_buffer
116
+ @diakonos_home String containing the user's Diakonos dir (usually ~/.diakonos)
117
+ @buffers A BufferHash holding all the open buffers
118
+ @status_vars
119
+ @settings A Hash containing all settings from all configuration files
120
+
121
+ When not within a method of Diakonos::Functions, main ::Diakonos::Diakonos
122
+ object can be referred to by using the global variable $diakonos.
123
+
124
+
125
+ Tags: script scripts scripting program programming language ruby extend extension extensions plugin plug-in plugins plug-ins addon addons add-on add-ons package packages format layout structure load loading unload unloading activate deactivate activating deactivating install installing installation
@@ -0,0 +1,24 @@
1
+ # File Type
2
+
3
+ The language (or type) of a file is shown in the status bar between
4
+ parentheses. For example, the file type of this help document is "dhf".
5
+
6
+ Diakonos can usually guess a file's language correctly. To do so, it
7
+ considers the filename and, if present, the "bang" line at the top of the
8
+ file. The bang line takes precedence over the filename.
9
+
10
+ If Diakonos was wrong in its automatic determination of the file type, you can
11
+ force it to assume a certain file type by pressing <Alt-Shift-T> and typing in
12
+ the file type (e.g. java, ruby, html, xml, and so on).
13
+
14
+ The configuration settings (available by pressing <F12>) which affect
15
+ Diakonos' guessing are a language's filemask and bangmask settings. These
16
+ settings are regular expressions. For example:
17
+
18
+ lang.perl.filemask \.(?:pl|pm)$
19
+ lang.perl.bangmask perl
20
+
21
+ These configuration lines tell Diakonos to think a file is a Perl file if its
22
+ extension is .pl or .pm, or if the bang line has the word "perl" in it.
23
+
24
+ Tags: file files lang language languages programming type mode types modes
@@ -0,0 +1,127 @@
1
+ # Key Mapping
2
+
3
+ ## Executive Summary
4
+
5
+ <Alt-Shift-K> key mapping exploration mode
6
+ <Alt-K> key printing mode
7
+ <F12> edit configuration file
8
+
9
+ Example configuration line:
10
+
11
+ key alt+b alt+! addNamedBookmark 1
12
+
13
+ ## Customizing the Diakonos key mapping
14
+
15
+ Diakonos' key mapping is extremely customizable. You can map any Diakonos
16
+ function to nearly any key chord or key sequence (as long as your terminal
17
+ can produce the chord or sequence).
18
+
19
+ To change the key mapping for a function, or to change the function mapped to
20
+ a key mapping, you need to know what function you want performed, and what key
21
+ chord or sequence you want to press in order to perform that function.
22
+ Diakonos can help you determine these.
23
+
24
+ ## What does this key do?
25
+
26
+ Press <Alt-Shift-K> and Diakonos will enter a special mode. In this mode, any
27
+ key chord or sequence you press will make Diakonos report the function (and
28
+ any function arguments) which are mapped to what you pressed. Try it now!
29
+ When you are finished exploring, press <Enter> to exit the key mapping
30
+ exploration mode.
31
+
32
+ Here is an example of what the key exploration mode might display. This is
33
+ seen when you query what <Ctrl-S> does:
34
+
35
+ ctrl+s -> saveFile( )
36
+
37
+ This indicates that the keychord (ctrl+s) executes the saveFile function. The
38
+ empty parentheses tell us that the saveFile function is not given any
39
+ arguments.
40
+
41
+ It is worth noting that some keys or chords may have strange-looking key
42
+ sequences, depending on your terminal. For example, the <Home> key may not be
43
+ a single keycode, but rather a sequence, like "esc [ 1 ~". There's nothing
44
+ wrong with this, but you should be aware of it when customizing your keyboard
45
+ layout.
46
+
47
+ ## What do I need to press to _____?
48
+
49
+ One way to determine the current key mapping for a given feature or function
50
+ is to press <F1> to enter the help system, and then type some search keywords
51
+ to search the help system for documentation describing the feature. All help
52
+ documents have relevant key mappings described. Once you determine the key
53
+ mapping for the function you're interested in, use <Alt-Shift-K> to get the
54
+ actual name of the function.
55
+
56
+ Not all features may be documented at this time, though. If you can't find
57
+ the key mapping for a function, the alternative is to open the configuration
58
+ file (with <F12>) and move down to the key configuration section. This
59
+ section has many lines starting with the word "key", such as these lines:
60
+
61
+ key left;cursorLeft
62
+ key esc [ D;cursorLeft
63
+ key right;cursorRight
64
+ key esc [ C;cursorRight
65
+
66
+ ## How do I specify a keychord or sequence?
67
+
68
+ Diakonos has another built-in function to help you in mapping keys. Press
69
+ <Alt-K>, and Diakonos enters a key printing mode. In this mode, you can
70
+ press any sequence of keystrokes or key chords, and Diakonos will display
71
+ what string to use in the configuration file. Press <Enter> when you have
72
+ completed your sequence.
73
+
74
+ Here are a couple of examples.
75
+
76
+ If you press <Alt-K> and then <Ctrl-D> and <Enter>, it will print the string
77
+ "ctrl+d" into the current buffer.
78
+
79
+ If you press <Alt-K> and then <Alt-L> and <Home>, and press <Enter>, it will
80
+ print something like "esc l esc [ 1 ~" into the current buffer (the exact
81
+ string may vary depending on your terminal). Use these strings to configure
82
+ Diakonos' key mapping (see below).
83
+
84
+ ## Setting a key mapping
85
+
86
+ Once you know the name of the function you want performed and the string for
87
+ the key mapping, press <F12> to edit the configuration file. Add a new key
88
+ mapping line to the key configuration area. It doesn't matter exactly where,
89
+ but you should try to keep your configuration file organized to make it easier
90
+ to adjust in the future. A key mapping line looks like this:
91
+
92
+ key alt+b alt+! addNamedBookmark 1
93
+
94
+ It has these components:
95
+ - the "key" configuration command
96
+ - one or more keystrokes or keychords, in order ("alt+b alt+!")
97
+ - two or more spaces
98
+ - the Diakonos function ("addNamedBookmark")
99
+ - any arguments to the function, separated by commas ("1")
100
+
101
+ For example, suppose you wanted to make the keychord <Alt-L> drop to the shell
102
+ and execute 'ls' and show the results. You would set this up with a new line
103
+ in the configuration file. Type 'key' and space:
104
+
105
+ key
106
+
107
+ then press <Alt-K>, <Alt-L> and <Enter> to print out the string Diakonos
108
+ expects for <Alt-L>. Your line will then be:
109
+
110
+ key esc l
111
+
112
+ Then add a few spaces, and the shell command. Your final line will be:
113
+
114
+ key esc l shell "ls"
115
+
116
+ Press <Ctrl-S> to save the configuration, and your new key mapping will be
117
+ ready for use. Try it!
118
+
119
+ ## Unsetting a key mapping
120
+
121
+ If other configuration files (such as the system-wide one) are introducing a
122
+ key mapping that you want to unmap, simply configure the key to have no
123
+ function. For example:
124
+
125
+ key ctrl+g
126
+
127
+ Tags: key keys keyboard map mapping layout change config configure set different alternate function feature command unset unmap override shortcut shortcuts short cuts
@@ -0,0 +1,22 @@
1
+ # Line Numbers
2
+
3
+ Diakonos indicates on the status line (at the bottom right of the screen) the
4
+ current line and column that the cursor is over. For example:
5
+
6
+ L 6/ 8 C13
7
+
8
+ means that the cursor is on the 13th column of the 6th line of a file which is
9
+ 8 lines long.
10
+
11
+ ## Showing line numbers
12
+
13
+ Default keychord <Alt-Shift-L> can be used to toggle line numbering on and
14
+ off. Line numbers appear in a left-side margin. Enable line numbering
15
+ permanently by setting view.line_numbers to true in your config. Set
16
+ view.line_numbers.width to the number of columns to use for the line numbering
17
+ margin. view.line_numbers.number_format is the setting to use to define a
18
+ sprintf format for the line numbers. Set the colour and brightness with
19
+ view.line_numbers.format.
20
+
21
+
22
+ Tags: line number numbers numbering sprintf format colour color config configuration set setting settings toggle show margin
data/help/macros.dhf ADDED
@@ -0,0 +1,27 @@
1
+ # Macro Recording and Playback
2
+
3
+ Diakonos has a macro system that allows you to record nearly any series of
4
+ commands and play them back. At the same time, advanced users may wish to
5
+ consider employing Diakonos' powerful Ruby scripting capabilities to leverage
6
+ their programming knowledge to manipulate text more directly.
7
+
8
+ ## Recording a Macro
9
+
10
+ If necessary, move the cursor to the desired place before beginning to record.
11
+ Press <Alt-M> to begin recording a macro. Type any sequence of keystrokes or
12
+ keychords. When you are finished entering the sequence, press <Alt-M> again
13
+ to stop recording.
14
+
15
+ ## Playing the Recorded Macro
16
+
17
+ After a macro is recorded, move the cursor to the spot where you wish to begin
18
+ executing the macro. Press <F4> to play the recorded macro.
19
+
20
+ ## Saving Macros
21
+
22
+ Diakonos currently has no facility to save macros for future playback. If you
23
+ want this feature in Diakonos, please visit the Diakonos technical support
24
+ channel and voice your request.
25
+
26
+
27
+ Tags: macro macros record recording play playback playing script scripting key keys keystroke keystrokes command commands function functions
data/help/new-file.dhf ADDED
@@ -0,0 +1,6 @@
1
+ # Creating a New File
2
+
3
+ Press <Ctrl-N> to open a new, empty buffer. The buffer will have no filename
4
+ associated with it until it is saved.
5
+
6
+ Tags: create creating open opening new file files
@@ -0,0 +1,21 @@
1
+ # Opening a File
2
+
3
+ Press <Ctrl-O> to open a file in Diakonos. You will be presented with a prompt
4
+ in which you can type in the path to the file you wish to open. When entering
5
+ a file path, you can use the <Tab> key to complete partial paths, just as you
6
+ can in your shell. Additionally, if a list of files is presented after
7
+ tab-completion, you can use the <Up> and <Down> arrow keys to select one of the
8
+ listed files, and press <Enter> to open the selected file.
9
+
10
+ You can also open files by passing one or more filenames as arguments to the
11
+ "diakonos" command. For example:
12
+
13
+ diakonos ~/.diakonos/diakonos.conf
14
+
15
+ Diakonos can also open all files in a directory tree matching a regular
16
+ expression, using the -m command line option:
17
+
18
+ cd ~/project
19
+ diakonos -m some_method_name
20
+
21
+ Tags: open opening file files new existing dir directory regex regexes regexen regexp regexps regular expression expressions match matching grep
data/help/quit.dhf ADDED
@@ -0,0 +1,7 @@
1
+ # Quitting Diakonos
2
+
3
+ To quit (close) the Diakonos text editor, press <Ctrl-Q>. If any open files
4
+ have unsaved modifications, you will be prompted about what further action you
5
+ would like to take.
6
+
7
+ Tags: quit quitting exit exitting leave leaving close closing
data/help/resizing.dhf ADDED
@@ -0,0 +1,19 @@
1
+ # Resizing Diakonos
2
+
3
+ In most cases, Diakonos can automatically detect when the wrapping terminal or
4
+ console changes size (due to a window resize or font change), and redraw
5
+ itself.
6
+
7
+ On some systems, however, Diakonos cannot handle a terminal resize. If your
8
+ system exhibits problems after resizing, try this bash command before starting
9
+ Diakonos:
10
+
11
+ shopt -s checkwinsize
12
+
13
+ Read more about the shopt built-in command here:
14
+
15
+ http://linux.about.com/library/cmd/blcmdl1_shopt.htm
16
+
17
+ Pressing <Ctrl-Alt-R> will force Diakonos to redraw itself.
18
+
19
+ Tags: bash size resize resizing window terminal console change draw redraw problem problems troubleshoot troubleshooting issue issues
data/help/ruby.dhf ADDED
@@ -0,0 +1,17 @@
1
+ # Ruby Compatibility
2
+
3
+ ## Ruby 1.9
4
+
5
+ Usage to date has shown that Diakonos is fully compatible with Ruby 1.9.
6
+ There are no known problems. If you encounter any issues when running
7
+ Diakonos under Ruby 1.9, please report them in IRC or with the issue tracker.
8
+
9
+ ## Ruby 1.8
10
+
11
+ Support for Ruby 1.8 was dropped as of Diakonos version 0.8.8.
12
+ 0.8.9 is the last version of Diakonos to somewhat run under Ruby 1.8.
13
+ 0.8.10+ are known not to run at all under Ruby 1.8.
14
+
15
+
16
+
17
+ Tags: ruby 1.9 1.8 19 18 compatible compatibility problems issues version
@@ -0,0 +1,10 @@
1
+ # Saving a File
2
+
3
+ Press <Ctrl-S> to save the current file. Press <Alt-Shift-S> to save the current
4
+ file under a different filename or path.
5
+
6
+ The strip_trailing_whitespace_on_save setting controls whether trailing
7
+ whitespace is removed from the lines of a file when a buffer is saved. The
8
+ default configuration has this setting turned on.
9
+
10
+ Tags: save saving file filename as save-as trailing white space whitespace