e
e copied to clipboard
e - a smart wrapper for $EDITOR
e - a smart wrapper for $EDITOR
NAME
e(1) - a smart wrapper for $EDITOR
SYNOPSIS
e [[+LINENO|+/PATTERN] FILENAME [+LINENO|+/PATTERN]] ...
DESCRIPTION
e(1) is a smart wrapper for $EDITOR written in Bourne shell. It
enhances any editor with some user friendly features described below.
ENVIRONMENT
-
EDITORThe command (or command line) wrapped around and invoked by this wrapper.
EXAMPLES
If you have the environment variable EDITOR defined, then you are
ready to run e. You can just drop the alias or symlink pointing to
your editor. e is much more than an alias.
-
You invoke the editor of your choice hundreds of times everyday, so the command name has to be short. "
vi" may look fine, but still it's one stroke too many. Start usingefrom now on and save your precious time.# In your shell's profile # EDITOR=vi; export EDITOR $ e anyfile -
etakes input from stdin so you can open the output of a command with the editor.$ git diff | e -
eprints the edited content if so requested.$ e test.pl | perl -
Combining the above two, you can use
eas a filter in which you can edit an intermediate output just as you want.$ git diff | e > annotated.patch -
As you may have noticed, with
eyou can forget about adding<`tty`and/or>`tty`around even if you are in the middle of pipes and redirection.$ grep -lr keyword . | xargs -n1 e $ grep -lr keyword . | while read f; do e "$f"; done -
As a bonus for non-vi users,
eoffers support for "+/PATTERN" to all editors including Emacs.# EDITOR="emacsclient -t" $ e +/'^main' prog.c # Internally calls grep(1) with -E and runs $EDITOR, adding "+LINENO" # if found. -
etakes a position specifier followed by a file name. This form is exclusively supported by vi variants, butechanges the parameter order so it works with most editors.$ e prog.rb +42 # Runs `$EDITOR +42 prog.rb` -
eunderstands the "FILENAME:LINENO" format, which is converted to "+LINENO FILENAME" if a file namedFILENAMEexists.$ e /path/to/file.rb:1218 # Runs `$EDITOR +1218 /path/to/file.rb`
SEE ALSO
grep(1),
emacsclient(1),
vi(1)
AUTHOR
Copyright (c) 2009, 2010, 2011, 2012 Akinori MUSHA.
Licensed under the 2-clause BSD license. See LICENSE.txt for
details.
Visit GitHub Repository for the latest information.