]> git.mdlowis.com Git - projs/tide.git/commitdiff
Tweaked xedit documentation and filled out section detailing selection rules
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 3 May 2017 12:25:11 +0000 (08:25 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 3 May 2017 12:25:11 +0000 (08:25 -0400)
docs/xedit.1
docs/xedit.1.md

index dfb531e36d6ed43da957bc4492fee8c0fdd48930..99d9e9e1cc6d3172bd2a25281e3ed850d62416f9 100644 (file)
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "XEDIT" "1" "April 2017" "" ""
+.TH "XEDIT" "1" "May 2017" "" ""
 .
 .SH "NAME"
 \fBxedit\fR \- a text editor inspired by acme(1) from Plan 9 and Inferno
@@ -28,7 +28,27 @@ The mechanics of editing text in the tag and content region is identical with th
 Searching with a term selected in the tags region will search for the term in the content region rather than the tags region\. In this way a user can edit the search term incrementally and perform repeated searches through the content region\. Searching for a term in the content region \fIwill\fR search for the term in the content region however\.
 .
 .SH "TEXT SELECTION"
-TBD
+\fBxedit\fR uses a series of rules to determine how much text to select when the user executes a context sensitive selection, a search, or a context sensitive execution\. The following rules are applied in order until a match is found\.
+.
+.IP "1." 4
+\fBCursor over \'(\' or \')\'\fR: Highlight text between the parentheses including nested parentheses\.
+.
+.IP "2." 4
+\fBCursor over \'[\' or \']\'\fR: Highlight text between the brackets including nested brackets\.
+.
+.IP "3." 4
+\fBCursor over \'{\' or \'}\'\fR: Highlight text between the braces including nested braces\.
+.
+.IP "4." 4
+\fBCursor at beginning or end of line\fR: Highlight the entire line (including the newline)
+.
+.IP "5." 4
+\fBCursor over alphanumeric character or underscore\fR: Highlight the word under the cursor consisting of only alphanumeric and underscore characters\.
+.
+.IP "" 0
+.
+.P
+If none of the above rules match, \fBxedit\fR will simply highlight the block of non\-whitespace characters under the cursor\.
 .
 .SH "MOUSE HANDLING"
 .
@@ -71,10 +91,6 @@ Move cursor to the beginning of the line\.
 \fBCtrl+e\fR
 Move cursor to the end of the line\.
 .
-.TP
-\fBCtrl+h\fR
-Delete the cursor to the left\.
-.
 .SS "Cursor Movement and Selection"
 The key combinations below are responsible for moving the cursor around the document by character, by word, or by line\. The \fBShift\fR modifier key can be applied to any of them to also extend the current selection to the new cursor position\.
 .
@@ -186,6 +202,10 @@ Decrease the indent level of the selected text\.
 Increase the indent level of the selected text\.
 .
 .TP
+\fBCtrl+h\fR
+Highlight the item under cursor following the rules in \fBTEXT SELECTION\fR
+.
+.TP
 \fBCtrl+t\fR
 Toggle focus between the tags region and the content region\.
 .
index c0548f9e16a6f3f621cc006fca92e5a54b40a132..330771dd47e31d1b418592a2359885321ec8fe41 100644 (file)
@@ -59,7 +59,28 @@ the content region however.
 
 ## TEXT SELECTION
 
-TBD
+`xedit` uses a series of rules to determine how much text to select when the 
+user executes a context sensitive selection, a search, or a context sensitive 
+execution. The following rules are applied in order until a match is found.
+
+1. `Cursor over '(' or ')'`:
+    Highlight text between the parentheses including nested parentheses.
+
+2. `Cursor over '[' or ']'`:
+    Highlight text between the brackets including nested brackets.
+
+3. `Cursor over '{' or '}'`:
+    Highlight text between the braces including nested braces.
+    
+4. `Cursor at beginning or end of line`:
+    Highlight the entire line (including the newline)
+    
+5. `Cursor over alphanumeric character or underscore`:
+    Highlight the word under the cursor consisting of only alphanumeric and 
+    underscore characters.
+    
+If none of the above rules match, `xedit` will simply highlight the block of 
+non-whitespace characters under the cursor.
 
 ## MOUSE HANDLING
 
@@ -93,16 +114,18 @@ TBD
 
 * `Ctrl+u`:
     Delete from the cursor position to the beginning of the line.
+
 * `Ctrl+k`:
     Delete from the cursor position to the end of the line.
+
 * `Ctrl+w`:
     Delete the word to the left.
+
 * `Ctrl+a`:
     Move cursor to the beginning of the line.
+
 * `Ctrl+e`:
     Move cursor to the end of the line.
-* `Ctrl+h`:
-    Delete the cursor to the left.
 
 ### Cursor Movement and Selection
 
@@ -114,16 +137,22 @@ position.
 * `Escape`:
     Highlight the last contiguous block of inserted text or clear the current
     selection (deselect the currently selected text).
+
 * `Left`:
     Move the cursor one character to the left.
+
 * `Right`:
     Move the cursor one character to the right.
+
 * `Up`:
     Move the cursor to theprevious line.
+
 * `Down`:
     Move the cursor to the next line.
+
 * `Ctrl+Left`:
     Move the cursor to the beginning of the word to the left.
+
 * `Ctrl+Right`:
     Move the cursor to the end of the word to the right.
 
@@ -131,31 +160,44 @@ position.
 
 * `Ctrl+s`:
     Save the contents of the content region to disk.
+
 * `Ctrl+z`:
     Undo the last change performed on the active region.
+
 * `Ctrl+y`:
     Redo the previously undone change on the active region.
+
 * `Ctrl+x`:
     Cut the selected text to the X11 CLIPBOARD selection.
+
 * `Ctrl+c`:
     Copy the selected text to the X11 CLIPBOARD selection.
+
 * `Ctrl+v`:
     Paste the contents of the X11 CLIPBOARD selection to the active region.
+
 * `Delete`:
     Delete the character to the right.
+
 * `Ctrl+Delete`:
     Delete the word to the right.
+
 * `Backspace`:
     Delete the character to the left.
+
 * `Ctrl+Backspace`:
     Delete the word to the left.
+
 * `Ctrl+Enter`:
     Create a new line after the current line and place the cursor there.
+
 * `Ctrl+Shift+Enter`:
     Create a new line before the current line and place the cursor there.
+
 * `PageUp`:
     Scroll the active region up by one screenful of text. The cursor is not
     affected by this operation.
+
 * `PageDn`:
     Scroll the active region down by one screenful of text. The cursor is not
     affected by this  operation.
@@ -172,6 +214,7 @@ search operation to be applied in the opposite direction of the previous.
     Search for the next occurrence of the selected text in the content region.
     If no text is currently selected, the text under the cursor is selected
     based on context as described in `TEXT SELECTION`.
+
 * `Ctrl+Alt+f`:
     Search for the next occurence previous search term in the content region.
 
@@ -179,33 +222,44 @@ search operation to be applied in the opposite direction of the previous.
 
 * `Ctrl+[`:
     Decrease the indent level of the selected text.
+
 * `Ctrl+]`:
     Increase the indent level of the selected text.
+
+* `Ctrl+h`:
+    Highlight the item under cursor following the rules in `TEXT SELECTION`
+
 * `Ctrl+t`:
     Toggle focus between the tags region and the content region.
+
 * `Ctrl+q`:
     Quit the editor. If the file is modified a warning will be printed in the
     tags region and the editor will not quit. Executing the  shortcut twice
     within 250ms will ignore the warning and quit the editor without saving.
+
 * `Ctrl+d`:
     Execute the selected text as described in `COMMAND EXECUTION`. If no text
     is selected, the text under cursor is selecte dbased on context as described
     in `TEXT SELECTION`.
+
 * `Ctrl+o`:
     Launch xfilepick(1) to choose a file from a recursive list of files in the
     current deirectory and sub directories. This file will be opened in a
     new instance of `xedit`.
+
 * `Ctrl+p`:
     Launch xtagpick(1) to select a tag from a ctags(1) generated index file.
     `xedit` will jump to the selected ctag definition in the current window if
     the file is currently being edited. Otherwise, a new instance of `xedit`
     will be launched with the target file and the cursor set to the line
     containing the definition.
+
 * `Ctrl+g`:
     Lookup the selected symbol or symbol under the cursor in a ctags(1)
     generated index file. Jump to the location of the definition if it exist in
     the current file. Otherwise, a new instance of `xedit` will be launched with
     the target file and the cursor set to the line containing the definition.
+
 * `Ctrl+n`:
     Open a new instance of `xedit` with no filename.
 
@@ -213,29 +267,41 @@ search operation to be applied in the opposite direction of the previous.
 
 * `Cut`:
     Cut the selection to the X11 CLIPBOARD selection.
+
 * `Copy`:
     Copy the selection to the X11 CLIPBOARD selection.
+
 * `Eol`:
     Toggle the line-ending style for the buffers contents between LF and CRLF
+
 * `Find [term]`:
     Find the next occurrence of the selected text.
+
 * `GoTo [arg]`:
     Jump to a specific line number or symbol.
+
 * `Indent`:
     Toggle the autoindent feature on or off.
+
 * `Paste`:
     Paste the contents of the X11 CLIPBOARD selection into the buffer.
+
 * `Quit`:
     Quit the editor.
+
 * `Redo`:
     Redo the last undone change.
+
 * `Save`:
     Save the contents of the buffer to disk.
+
 * `SaveAs [path]`:
     Save the contents of the buffer to disk. If a path argument is provided, the 
     buffer will be saved to the new path.
+
 * `Tabs`:
     Toggle the expand tabs featuer on or off.
+
 * `Undo`:
     Undo the previous edit.