minime – a minimalist Unix text editor

Unix philosophy encourages developers to focus on minimal programs that communicate using text streams. However, most text editors for unixoid operating systems do not follow these guidelines, relying on internal functionality instead of standard text manipulation applications like the GNU core utilities.

This architectural choice implies complexity and hinders re-use: Emacs contains a complete environment for a dialect of the LISP programming language; applications such as IRC clients written in Emacs LISP cannot easily be used outside Emacs.

The minimalist editor minime (source code) conforms to Unix philosophy in the most simple way: Inspired by the text editor sam, all programmatic text transformations are done by piping text to external programs; see the minime README for details.

the minime interface consists of two text buffers, the main buffer at the top
and the mini buffer at the bottom. the main buffer is for editable text, the
minibuffer is for commands that act upon the text in the main buffer. minime
takes a single optional argument, which is interpreted as a file from which to
populate the main buffer.

you can switch focus between buffers by pressing the tab key. if the minibuffer
is empty, upon switching to the minibuffer the current word in the main buffer
is copied to the mini buffer. upon pressing the return key while the minibuffer
has focus, the text in the minibuffer is evaluated as a command. focus is then
returned to the main buffer.

if a command starts with a ”<” character, the following characters specify the
name of a file. text is read into the main buffer from that file. if a command
starts with a “>” character, the following characters specify the name of a
file. text is written into the file from the main buffer. successful loading or
saving removes the first character from the minibuffer, leaving the filename.

if a command starts with a “|” character, the following characters specify a
shell command. the content of the main buffer is given to the shell command on
standard input and the output of the shell command is written into the main
buffer. if a command starts with another character, the command is evaluated as
a shell command with the empty string given on standard input.

Keys are bound to shell commands in a CSV configuration file called minimerc (screencast).

ctrl n,|true
meta w,>xsel -i
ctrl w,|xsel -i
ctrl y,<xsel -o
meta q,|fmt -w80 -g72
meta l,|ls
ctrl o,|xargs cat
meta o,>xargs xdg-open

10. September 2013 von erlehmann
Kategorien: Software | Schlagwörter: , , | 2 Kommentare

Kommentare (2)

  1. War noch nie auf deinem Blog – und jetzt habe ich gleich einen Texteditor entdeckt, toll. Habe mich erst kürzlich mit yocto herumgeschlagen, den fand ich auch schon recht toll. Aber minime gefällt mir noch besser! Was mich nur ein bisschen nervt, sind diese Fehlermeldungen, wenn man z. B. versucht, Binaries zu öffnen. Das sollte man, finde ich, noch nacharbeiten. Trotzdm tolles Ding!

  2. Minime error?

    I’m getting this while trying using tab:

    Traceback (most recent call last):
    File “./minime”, line 255, in
    loop.run()
    File “/usr/lib/pymodules/python2.6/urwid/main_loop.py”, line 170, in run
    self.screen.run_wrapper(self._run)
    File “/usr/lib/pymodules/python2.6/urwid/raw_display.py”, line 234, in run_wrapper
    return fn()
    File “/usr/lib/pymodules/python2.6/urwid/main_loop.py”, line 188, in _run
    self.event_loop.run()
    File “/usr/lib/pymodules/python2.6/urwid/main_loop.py”, line 498, in run
    self._loop()
    File “/usr/lib/pymodules/python2.6/urwid/main_loop.py”, line 523, in _loop
    self._watch_files[fd]()
    File “/usr/lib/pymodules/python2.6/urwid/main_loop.py”, line 234, in _update
    self.process_input(keys)
    File “/usr/lib/pymodules/python2.6/urwid/main_loop.py”, line 323, in process_input
    self.unhandled_input(k)
    File “/usr/lib/pymodules/python2.6/urwid/main_loop.py”, line 350, in unhandled_input
    return self._unhandled_input(input)
    File “./minime”, line 211, in handle_input
    focus = frame.get_focus()
    AttributeError: ‘Frame’ object has no attribute ‘get_focus’

    Would you know what the issue is?

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert


Before you post, please prove you are sentient.

Was ist der Vorname von Franz Beckenbauer?