Console Text Editor with Windows-like keyboard shortcuts (ctrl-z, x, c, v)

command lineeditorssoftware-rec

Ok, I realise that I risk a religious war asking a question about text editors, but here goes.

Requirements

  • Mostly used for config file edits
  • Text based not GUI
  • Available for Raspian flavour of Debian
  • No learning required for a Windows/Mac GUI user (no vi/vim)
  • Makes full use of keys found on modern keyboards, i.e. home, end, pgup, pgdn, del
  • Use keyboard shortcuts found in pretty much all GUI apps,
    e.g. Undo (Ctrl-Z), Redo (Shift-Ctrl-Z),
    Select All (Ctrl-A), Cut (Ctrl-X), Copy (Ctrl-C),
    Paste (Ctrl-V), Expand selection (Shift-Arrow), Skip word (Ctrl-Arrow), Delete selection (Del) etc
  • Optional: mouse support for changing cursor position and selecting text

Surely this isn't a big ask in this day and age?

Best Answer

Try Micro.

https://github.com/zyedidia/micro

Micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities of modern terminals. It comes as one single, batteries-included, static binary with no dependencies, and you can download and use it right now.

As the name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use in a pinch, but micro also aims to be enjoyable to use full time, whether you work in the terminal because you prefer it (like me), or because you need to (over ssh).

Screenshots & colorschemes

It's just about perfect. Shift-arrow selection works perfectly. Control-C (cut), Control-V (paste), Control-Z (undo), Control-S (save) all work as expected. It also indents and unindents selections perfectly.

You need a terminal emulator that properly supports the shift key. Terminator works fine out of the box. Some Android-based terminals do not support shift-selection, but JuiceSSH (most popular in Google Play) works, though I haven't extensively tested it yet.

Related Question