No description
Find a file
2021-01-21 13:08:59 +01:00
e FIx -: without a line or space. 2021-01-21 13:08:59 +01:00
e.1 manpage: explain the relation between normal mode and -: 2018-08-10 01:31:39 +02:00
LICENSE Slap on a license. 2018-08-10 15:44:43 +02:00
README.md Document filenames with spaces being no longer accepted with -:/-:: 2021-01-18 22:59:34 +01:00

All or almost all Unix editors support the syntax of "editor +42 file", to open the given file and start with the cursor at line 42. Alas, the syntax programs that output such data use is different: either "file:42: Something" or "file:42:1: Something", :1 being a column number.

This wrapper will recognize such references and call your $EDITOR using the + notation. Thus, once you see an error message, you can copy&paste the offending first word of it without having to think. Especially if your mouse selection is configured to allow ':', it's a single triple-click (L+L+M), and still pretty handy if not.

If your editor allows multi-open, "e" can also handle pipelines such as:

  • git grep MEOW|e -:
  • make 2>&1 >/dev/null|grep error:|e -::

Also, because of its short name, it reduces the typing needed to start the editor by half if you use vi, by 80% if emacs or jstar — and that's by far the most frequent command a Unix user does.

v0.2

Possible regression: to handle file:42 patterns in the middle of a line, e -: and -:: no longer allows filenames with a space. If this proves to be an issue, please shout at me.