From: Michael D. Lowis Date: Sat, 27 May 2017 00:54:48 +0000 (-0400) Subject: rename to tide X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=bc8ecd9993b5283febb89a3e326af6af3c9efd35;p=projs%2Ftide.git rename to tide --- diff --git a/.gitignore b/.gitignore index eb84973..fa9f81c 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,5 @@ tests/libedit tests/term term xcpd +tests/tide +tide diff --git a/Makefile b/Makefile index 4603fa7..c95ac5d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ INCS = -Iinc/ -BINS = xedit xpick xcpd term -MAN1 = docs/xedit.1 docs/xpick.1 docs/xtagpick.1 docs/xfilepick.1 +BINS = tide xpick xcpd term +MAN1 = docs/tide.1 docs/xpick.1 docs/xtagpick.1 docs/xfilepick.1 LIBEDIT_OBJS = \ lib/buf.o \ @@ -14,7 +14,7 @@ LIBEDIT_OBJS = \ lib/win.o TEST_BINS = \ - tests/xedit \ + tests/tide \ tests/xpick \ tests/term \ tests/libedit @@ -30,19 +30,19 @@ docs: clean: find . -name '*.[oad]' -delete - $(RM) xpick xedit xcpd term tests/libedit + $(RM) xpick tide xcpd term tests/libedit $(RM) $(TEST_BINS) install: all mkdir -p $(PREFIX)/bin - cp -f xedit $(PREFIX)/bin + cp -f tide $(PREFIX)/bin cp -f xpick $(PREFIX)/bin cp -f xcpd $(PREFIX)/bin cp -f xfilepick $(PREFIX)/bin cp -f xtagpick $(PREFIX)/bin uninstall: - rm -f $(PREFIX)/bin/xedit + rm -f $(PREFIX)/bin/tide rm -f $(PREFIX)/bin/xpick rm -f $(PREFIX)/bin/xcpd rm -f $(PREFIX)/bin/xfilepick @@ -54,12 +54,12 @@ test: $(TEST_BINS) libedit.a: $(LIBEDIT_OBJS) $(AR) $(ARFLAGS) $@ $^ -xedit: xedit.o libedit.a +tide: tide.o libedit.a xpick: xpick.o libedit.a xcpd: xcpd.o libedit.a term: term.o libedit.a tests/libedit: tests/libedit.o tests/lib/buf.o tests/lib/utf8.o libedit.a -tests/xedit: tests/xedit.o libedit.a +tests/tide: tests/tide.o libedit.a tests/xpick: tests/xpick.o libedit.a tests/term: tests/term.o libedit.a diff --git a/config.h b/config.h index 925510f..a682552 100644 --- a/config.h +++ b/config.h @@ -57,7 +57,7 @@ char* PickFileCmd[] = { "xfilepick", ".", NULL }; char* PickTagCmd[] = { "xtagpick", NULL, "tags", NULL, NULL }; /* Open a new instance of the editor */ -char* OpenCmd[] = { "xedit", NULL, NULL }; +char* OpenCmd[] = { "tide", NULL, NULL }; /* Solarized Theme - 16 color palette used for drawing */ unsigned int ColorPalette[16] = { diff --git a/docs/xedit.1 b/docs/tide.1 similarity index 77% rename from docs/xedit.1 rename to docs/tide.1 index bc2cd56..2fea446 100644 --- a/docs/xedit.1 +++ b/docs/tide.1 @@ -1,25 +1,25 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "XEDIT" "1" "May 2017" "" "" +.TH "TIDE" "1" "May 2017" "" "" . .SH "NAME" -\fBxedit\fR \- a text editor inspired by acme(1) from Plan 9 and Inferno +\fBtide\fR \- a text editor inspired by acme(1) from Plan 9 and Inferno . .SH "SYNOPSIS" -\fBxedit\fR [\fIfile\fR\.\.\.] +\fBtide\fR [\fIfile\fR\.\.\.] . .SH "DESCRIPTION" -\fBxedit\fR is a text editor inspired by the Acme editor from the Plan 9 and Inferno operating systems\. Unlike Acme, \fBxedit\fR is a single window, single file editor\. Instead of baking a window manager into the editor, this job is relegated to an X11 window manager\. It is recommended that \fBxedit\fR be used with a tiling window manager such as dwm(1) or spectrwm(1)\. These window managers will make dealing with multiple windows much easier and more efficient\. +\fBtide\fR is a text editor inspired by the Acme editor from the Plan 9 and Inferno operating systems\. Unlike Acme, \fBtide\fR is a single window, single file editor\. Instead of baking a window manager into the editor, this job is relegated to an X11 window manager\. It is recommended that \fBtide\fR be used with a tiling window manager such as dwm(1) or spectrwm(1)\. These window managers will make dealing with multiple windows much easier and more efficient\. . .SS "Windows" -\fBxedit\fR windows are divided into four basic regions: a one\-line status, an expanding tags region, a main content region and an adjacent scroll region\. The status region contains a set of symbolic flags indicating the current state of the editor followed by the path of the file being edited\. The tags region acts as scratch buffer for commands that can be executed to affect the file or the state of the editor\. As the content of this region grows it will expand up to a quarter of the size of the window shrinking the main coantent region in kind\. The main content region displays a view of the file currently being edited\. To the left of the content region is a narrow vertical region matching the height of the content region\. This region acts as a scrollbar for the content region\. +\fBtide\fR windows are divided into four basic regions: a one\-line status, an expanding tags region, a main content region and an adjacent scroll region\. The status region contains a set of symbolic flags indicating the current state of the editor followed by the path of the file being edited\. The tags region acts as scratch buffer for commands that can be executed to affect the file or the state of the editor\. As the content of this region grows it will expand up to a quarter of the size of the window shrinking the main coantent region in kind\. The main content region displays a view of the file currently being edited\. To the left of the content region is a narrow vertical region matching the height of the content region\. This region acts as a scrollbar for the content region\. . .SS "Scrolling" The scroll bar is located to the left of the content region\. It\'s operation is similar to that of acme(1) or 9term(1)\. A left click on the scroll bar will scroll the adjacent line in the content region to the bottom of the window\. A right click will move the adjacent line in the content region to the top of the window\. A middle click will jump to an approximate location in the file determined by calculating the vertical distance from the top of the scrollbar and applying that as a percentage to the offset in the file\. . .SS "Typing and Editing" -Typed characters in \fBxedit\fR are delivered to the currently active region\. Which region is active is determined by the placement of the mouse or by keyboard shortcut\. That is to say, the focus follows the mouse much as it does in acme(1) but there is a keyboard shortcut that allows users to toggle focus between the content region and the tag region without using the mouse\. +Typed characters in \fBtide\fR are delivered to the currently active region\. Which region is active is determined by the placement of the mouse or by keyboard shortcut\. That is to say, the focus follows the mouse much as it does in acme(1) but there is a keyboard shortcut that allows users to toggle focus between the content region and the tag region without using the mouse\. . .P The mechanics of editing text in the tag and content region is identical with the exception of searching and saving\. Edited content in the tag region is not saved to disk unlike the content region\. This region is considered a scratch buffer for commands, notes, and other bits of text that are placed there temporarily\. The content region displays the current view of the file being edited and can be flushed to disk when requested\. @@ -28,7 +28,7 @@ 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" -\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\. +\fBtide\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\. @@ -48,7 +48,7 @@ Searching with a term selected in the tags region will search for the term in th .IP "" 0 . .P -If none of the above rules match, \fBxedit\fR will simply highlight the block of non\-whitespace characters under the cursor\. +If none of the above rules match, \fBtide\fR will simply highlight the block of non\-whitespace characters under the cursor\. . .SH "MOUSE HANDLING" . @@ -65,7 +65,7 @@ The middle mouse button is used for executing text at the clicked location\. The The right button is used to search for the next occurrence of the clicked text\. The search term is determined by the context rules defined in the \fBTEXT SELECTION\fR section\. The search direction follows the direction of the previous search operation\. The \fBShift\fR key can be held in combination with a click of the right mosue button in order to reverse the search direction\. . .SH "COMMAND EXECUTION" -\fBxedit\fR allows for the execution of any arbitrary text as a command\. The input and output to/from each command executed can be controlled by prepending one of a set of sigils defined below\. These sigils instruct \fBxedit\fR from where the command will receive its input and where it will place its output (both standard and errors)\. +\fBtide\fR allows for the execution of any arbitrary text as a command\. The input and output to/from each command executed can be controlled by prepending one of a set of sigils defined below\. These sigils instruct \fBtide\fR from where the command will receive its input and where it will place its output (both standard and errors)\. . .TP \fB\'!\' \- Run command detached from editor\fR @@ -221,7 +221,7 @@ Scroll the active region up by one screenful of text\. The cursor is not affecte Scroll the active region down by one screenful of text\. The cursor is not affected by this operation\. . .SS "Bookmark Shortcuts" -\fBxedit\fR supports marking locations in a document to quickly jump to later\. This eases navigation between multiple locations in a large document\. +\fBtide\fR supports marking locations in a document to quickly jump to later\. This eases navigation between multiple locations in a large document\. . .TP \fBCtrl+[0\-9]\fR @@ -270,15 +270,15 @@ Execute the selected text as described in \fBCOMMAND EXECUTION\fR\. If no text i . .TP \fBCtrl+o\fR -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 \fBxedit\fR\. +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 \fBtide\fR\. . .TP \fBCtrl+p\fR -Launch xtagpick(1) to select a tag from a ctags(1) generated index file\. \fBxedit\fR will jump to the selected ctag definition in the current window if the file is currently being edited\. Otherwise, a new instance of \fBxedit\fR will be launched with the target file and the cursor set to the line containing the definition\. +Launch xtagpick(1) to select a tag from a ctags(1) generated index file\. \fBtide\fR will jump to the selected ctag definition in the current window if the file is currently being edited\. Otherwise, a new instance of \fBtide\fR will be launched with the target file and the cursor set to the line containing the definition\. . .TP \fBCtrl+g\fR -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 \fBxedit\fR will be launched with the target file and the cursor set to the line containing the definition\. +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 \fBtide\fR will be launched with the target file and the cursor set to the line containing the definition\. . .TP \fBCtrl+Shift+g\fR @@ -286,7 +286,7 @@ Jump to the previous cursor location\. . .TP \fBCtrl+n\fR -Open a new instance of \fBxedit\fR with no filename\. +Open a new instance of \fBtide\fR with no filename\. . .SH "BUILTINS" . @@ -354,7 +354,7 @@ Undo the previous edit\. . .TP \fB$HOME/\.config/edit/editrc\fR -Shell script loaded in current environment to make shell functions and environment variables available to xedit(1) +Shell script loaded in current environment to make shell functions and environment variables available to tide(1) . .SH "ENVIRONMENT" . @@ -370,4 +370,4 @@ The contents of this variable are used as the shell in which all non\-builtin co Michael D\. Lowis . .SH "SEE ALSO" -xedit(1) xpick(1) xfilepick(1) xtagpick(1) +tide(1) xpick(1) xfilepick(1) xtagpick(1) diff --git a/docs/xedit.1.md b/docs/tide.1.md similarity index 91% rename from docs/xedit.1.md rename to docs/tide.1.md index e24c0cd..b9e29f7 100644 --- a/docs/xedit.1.md +++ b/docs/tide.1.md @@ -1,21 +1,21 @@ -# xedit -- a text editor inspired by acme(1) from Plan 9 and Inferno +# tide -- a text editor inspired by acme(1) from Plan 9 and Inferno ## SYNOPSIS -`xedit` [_file_...] +`tide` [_file_...] ## DESCRIPTION -`xedit` is a text editor inspired by the Acme editor from the Plan 9 and Inferno -operating systems. Unlike Acme, `xedit` is a single window, single file editor. +`tide` is a text editor inspired by the Acme editor from the Plan 9 and Inferno +operating systems. Unlike Acme, `tide` is a single window, single file editor. Instead of baking a window manager into the editor, this job is relegated to an -X11 window manager. It is recommended that `xedit` be used with a tiling window +X11 window manager. It is recommended that `tide` be used with a tiling window manager such as dwm(1) or spectrwm(1). These window managers will make dealing with multiple windows much easier and more efficient. ### Windows -`xedit` windows are divided into four basic regions: a one-line status, an +`tide` windows are divided into four basic regions: a one-line status, an expanding tags region, a main content region and an adjacent scroll region. The status region contains a set of symbolic flags indicating the current state of the editor followed by the path of the file being edited. The tags region acts @@ -38,7 +38,7 @@ and applying that as a percentage to the offset in the file. ### Typing and Editing -Typed characters in `xedit` are delivered to the currently active region. Which +Typed characters in `tide` are delivered to the currently active region. Which region is active is determined by the placement of the mouse or by keyboard shortcut. That is to say, the focus follows the mouse much as it does in acme(1) but there is a keyboard shortcut that allows users to toggle focus between the @@ -59,7 +59,7 @@ the content region however. ## TEXT SELECTION -`xedit` uses a series of rules to determine how much text to select when the +`tide` 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. @@ -79,7 +79,7 @@ execution. The following rules are applied in order until a match is found. 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 +If none of the above rules match, `tide` will simply highlight the block of non-whitespace characters under the cursor. ## MOUSE HANDLING @@ -106,9 +106,9 @@ non-whitespace characters under the cursor. ## COMMAND EXECUTION -`xedit` allows for the execution of any arbitrary text as a command. The input +`tide` allows for the execution of any arbitrary text as a command. The input and output to/from each command executed can be controlled by prepending one of -a set of sigils defined below. These sigils instruct `xedit` from where the +a set of sigils defined below. These sigils instruct `tide` from where the command will receive its input and where it will place its output (both standard and errors). @@ -252,7 +252,7 @@ position. ### Bookmark Shortcuts -`xedit` supports marking locations in a document to quickly jump to later. This +`tide` supports marking locations in a document to quickly jump to later. This eases navigation between multiple locations in a large document. * `Ctrl+[0-9]`: @@ -304,26 +304,26 @@ search operation to be applied in the opposite direction of the previous. * `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`. + new instance of `tide`. * `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` + `tide` will jump to the selected ctag definition in the current window if + the file is currently being edited. Otherwise, a new instance of `tide` 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 current file. Otherwise, a new instance of `tide` will be launched with the target file and the cursor set to the line containing the definition. * `Ctrl+Shift+g`: Jump to the previous cursor location. * `Ctrl+n`: - Open a new instance of `xedit` with no filename. + Open a new instance of `tide` with no filename. ## BUILTINS @@ -377,7 +377,7 @@ search operation to be applied in the opposite direction of the previous. * `$HOME/.config/edit/editrc`: Shell script loaded in current environment to make shell functions and - environment variables available to xedit(1) + environment variables available to tide(1) ## ENVIRONMENT @@ -396,4 +396,4 @@ Michael D. Lowis ## SEE ALSO -xedit(1) xpick(1) xfilepick(1) xtagpick(1) +tide(1) xpick(1) xfilepick(1) xtagpick(1) diff --git a/docs/xpick.1 b/docs/xpick.1 index d99beb0..762c728 100644 --- a/docs/xpick.1 +++ b/docs/xpick.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "XPICK" "1" "March 2017" "" "" +.TH "XPICK" "1" "May 2017" "" "" . .SH "NAME" \fBxpick\fR \- fuzzy find an item from a list of items @@ -25,4 +25,4 @@ If this variable is set its contents are used to populate the status region of t Michael D\. Lowis . .SH "SEE ALSO" -xedit(1) xpick(1) xfilepick(1) xtagpick(1) +tide(1) xpick(1) xfilepick(1) xtagpick(1) diff --git a/docs/xpick.1.md b/docs/xpick.1.md index 6321aa2..3395814 100644 --- a/docs/xpick.1.md +++ b/docs/xpick.1.md @@ -6,10 +6,10 @@ ## DESCRIPTION -`xpick` Takes a list of items on standard input delimited by newlines and an -optional initial _query_. A gui window is then presented to the user which -allows the user to filter the list using a fuzzy-find algorithm. The user's -selection is printed to standard output upon completion. If no option is +`xpick` Takes a list of items on standard input delimited by newlines and an +optional initial _query_. A gui window is then presented to the user which +allows the user to filter the list using a fuzzy-find algorithm. The user's +selection is printed to standard output upon completion. If no option is selected `xpick` exits with no output. ### Fuzzy-Find Algorithm @@ -28,4 +28,4 @@ Michael D. Lowis ## SEE ALSO -xedit(1) xpick(1) xfilepick(1) xtagpick(1) +tide(1) xpick(1) xfilepick(1) xtagpick(1) diff --git a/tests/xedit.c b/tests/tide.c similarity index 99% rename from tests/xedit.c rename to tests/tide.c index 4423cc1..1fe0a69 100644 --- a/tests/xedit.c +++ b/tests/tide.c @@ -19,7 +19,7 @@ jmp_buf ExitPad; Display* XDisplay; // Include the source file so we can access everything -#include "../xedit.c" +#include "../tide.c" static void initialize(void) { ShellCmd[0] = "/bin/sh"; diff --git a/xedit.c b/tide.c similarity index 100% rename from xedit.c rename to tide.c