]> git.mdlowis.com Git - projs/tide.git/commitdiff
remove edit wrapper script
authorMichael D. Lowis <mike@mdlowis.com>
Sat, 27 May 2017 00:36:48 +0000 (20:36 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Sat, 27 May 2017 00:36:48 +0000 (20:36 -0400)
Makefile
docs/edit.1 [deleted file]
docs/edit.1.md [deleted file]
docs/xedit.1.md.2 [deleted file]
edit [deleted file]

index 1416b86d81ae8f9180ef4647c834da8de53d8c0b..4603fa70efaa4a1382b9ea33846354ea9fc76d0f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 INCS = -Iinc/
 
 BINS = xedit xpick xcpd term
-MAN1 = docs/edit.1 docs/xedit.1 docs/xpick.1 docs/xtagpick.1 docs/xfilepick.1
+MAN1 = docs/xedit.1 docs/xpick.1 docs/xtagpick.1 docs/xfilepick.1
 
 LIBEDIT_OBJS =     \
        lib/buf.o      \
@@ -40,16 +40,13 @@ install: all
        cp -f xcpd $(PREFIX)/bin
        cp -f xfilepick $(PREFIX)/bin
        cp -f xtagpick $(PREFIX)/bin
-       cp -f xman $(PREFIX)/bin
-       cp -f edit $(PREFIX)/bin
 
 uninstall:
        rm -f $(PREFIX)/bin/xedit
        rm -f $(PREFIX)/bin/xpick
+       rm -f $(PREFIX)/bin/xcpd
        rm -f $(PREFIX)/bin/xfilepick
        rm -f $(PREFIX)/bin/xtagpick
-       rm -f $(PREFIX)/bin/xman
-       rm -f $(PREFIX)/bin/edit
 
 test: $(TEST_BINS)
        for t in $(TEST_BINS); do ./$$t || exit 1; done
@@ -66,6 +63,7 @@ tests/xedit: tests/xedit.o libedit.a
 tests/xpick: tests/xpick.o libedit.a
 tests/term: tests/term.o libedit.a
 
+# define implicit rule for building binaries
 %: %.o
        $(LD) -o $@ $^ $(LDFLAGS)
 
diff --git a/docs/edit.1 b/docs/edit.1
deleted file mode 100644 (file)
index 6fd2d67..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "EDIT" "1" "May 2017" "" ""
-.
-.SH "NAME"
-\fBedit\fR \- convenience script for launching xedit(1) with a proper environment
-.
-.SH "SYNOPSIS"
-\fBedit\fR [\fIfile\fR\.\.\.]
-.
-.SH "DESCRIPTION"
-This script acts as a wrapper around xedit(1)\. It is responsible for setting up the environment variables and loading the rc file before launching a new instance of xedit(1) to edit the given files\. If no files are provided a new instance of xedit(1) will be launched with an empty edit buffer\.
-.
-.SH "FILES"
-.
-.TP
-\fB$HOME/\.config/edit/editrc\fR
-Shell script loaded in current environment to make shell functions and environment variables available to xedit(1)
-.
-.SH "ENVIRONMENT"
-.
-.TP
-\fBBASH_ENV\fR
-Set to same value as $EDITRCFILE so that the file is loaded as a bash script in the event that the user shell is bash(1)
-.
-.TP
-\fBDISPLAY\fR
-This variable is used to determine if we are running in an X11 environment\. If $DISPLAY is not set then the contents of the $EDITOR variable is used to determine what editor to launch in lieu of xedit(1)\. If $EDITOR is not set then vim(1) is launched instead\.
-.
-.TP
-\fBEDITRCFILE\fR
-Contains the path of the shell script which is loaded before xedit(1) to setup the environment and define shell functions which can be called during an editing session\.
-.
-.TP
-\fBEDITOR\fR
-Used as a fallback for when not running in an X11 system (xedit(1) is of course X11 only)\.
-.
-.TP
-\fBPATH\fR
-The $PATH variable is modified in order to add $HOME/config/edit/tools/ to the path\. This folder is a standard location in which user scripts and tools can be placed so they can be used from within xedit(1) without cluttering up the normal system path\.
-.
-.SH "AUTHOR"
-Michael D\. Lowis
-.
-.SH "SEE ALSO"
-xedit(1) xpick(1) xfilepick(1) xtagpick(1)
diff --git a/docs/edit.1.md b/docs/edit.1.md
deleted file mode 100644 (file)
index f14df3a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# edit -- convenience script for launching xedit(1) with a proper environment
-
-## SYNOPSIS
-
-`edit` [_file_...]
-
-## DESCRIPTION
-
-This script acts as a wrapper around xedit(1). It is responsible for setting up
-the environment variables and loading the rc file before launching a
-new instance of xedit(1) to edit the given files. If no files are provided a new
-instance of xedit(1) will be launched with an empty edit buffer.
-
-## FILES
-
-* `$HOME/.config/edit/editrc`:
-    Shell script loaded in current environment to make shell functions and
-    environment variables available to xedit(1)
-
-## ENVIRONMENT
-
-* `BASH_ENV`:
-    Set to same value as $EDITRCFILE so that the file is loaded as a bash script
-    in the event that the user shell is bash(1)
-
-* `DISPLAY`:
-    This variable is used to determine if we are running in an X11 environment.
-    If $DISPLAY is not set then the contents of the $EDITOR variable is used to
-    determine what editor to launch in lieu of xedit(1). If $EDITOR is not set
-    then vim(1) is launched instead.
-
-* `EDITRCFILE`:
-    Contains the path of the shell script which is loaded before xedit(1) to
-    setup the environment and define shell functions which can be called during
-    an editing session.
-
-* `EDITOR`:
-    Used as a fallback for when not running in an X11 system (xedit(1) is of
-    course X11 only).
-
-* `PATH`:
-    The $PATH variable is modified in order to add $HOME/config/edit/tools/ to
-    the path. This folder is a standard location in which user scripts and tools
-    can be placed so they can be used from within xedit(1) without cluttering up
-    the normal system path.
-
-## AUTHOR
-
-Michael D. Lowis
-
-## SEE ALSO
-
-xedit(1) xpick(1) xfilepick(1) xtagpick(1)
-
diff --git a/docs/xedit.1.md.2 b/docs/xedit.1.md.2
deleted file mode 100644 (file)
index f0ac013..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-# xedit -- a text editor inspired by Acme from Plan 9 and Inferno
-
-## SYNOPSIS
-
-`xedit` [_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.
-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
-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 
-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. 
-
-### Scrolling
-### Typing
-
-## TEXT SELECTION
-## MOUSE HANDLING
-## COMMAND EXECUTION
-
-## KEYBOARD SHORTCUTS
-
-### Unix Standard Shortcuts
-
-* `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
-
-The key combinations below are responsible for moving the cursor around the 
-document by character, by word, or by line. The `Shift` modifier key can be 
-applied to any of them to also extend the current selection to the new cursor 
-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.
-
-### Modern Text Editing Shortcuts
-
-* `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.
-
-### Search Shortcuts
-
-The shortcuts below allow the user to search for selected text or by context. 
-The direction of the search defaults to the forward direction with regard to the
-position in the file. Each search follows the direction of the previous search 
-unless the `Shift` modifier is applied. The `Shift` modifier causes the current 
-search operation to be applied in the opposite direction of the previous.
-
-* `Ctrl+f`:
-    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.
-
-### Implementation-specific Shortcuts
-
-* `Ctrl+[`: 
-    Decrease the indent level of the selected text.
-* `Ctrl+]`: 
-    Increase the indent level of the selected text.
-* `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.
-
-## BUILTINS
-
-* `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`:
-    Find the next occurrence of the selected text.
-* `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.
-* `Tabs`:
-    Toggle the expand tabs featuer on or off.
-* `Undo`:
-    Undo the previous edit.
-
-## FILES
-
-* `$HOME/.config/edit/editrc`:
-    Shell script loaded in current environment to make shell functions and 
-    environment variables available to xedit(1)
-
-## ENVIRONMENT
-
-* `SHELL`:
-    The contents of this variable are used as the shell in which all non-builtin
-    commands are executed. If this variable is not defined, sh(1) is used 
-    as a fallback shell.
-
-## BUGS
-## AUTHOR
-
-Michael D. Lowis
-
-## SEE ALSO
-
-xedit(1) xpick(1) xfilepick(1) xtagpick(1)
diff --git a/edit b/edit
deleted file mode 100755 (executable)
index 42ae479..0000000
--- a/edit
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# Add the editing tools directory to your PATH var so its contents may be used
-# while editing.
-export PATH="$HOME/.config/edit/tools:$PATH"
-
-# If $SHELL is bash, this will allow us to define functions in an RC file and
-# use them in the editor
-export EDITRCFILE="$HOME/.config/edit/editrc"
-export BASH_ENV="$EDITRCFILE"
-
-# Load the rc file
-if [ -f "$EDITRCFILE" ]; then
-    . "$EDITRCFILE"
-fi
-
-# Now figure out the correct editor to execute
-if [ -z "$DISPLAY" ]; then
-    if [ -z "$EDITOR" ]; then
-        vim "$@"
-    else
-        "$EDITOR" "$@"
-    fi
-else
-    (nohup xedit "$@" > /dev/null 2>&1) &
-fi