Is there a shell text editor that uses common keyboard shortcuts for navigation and editing?

I need the following features as much as possible:

  • Ctrl + (c/x/v) for copy, cut & paste
  • selecting by holding the Shift key and using the cursor keys ///
  • Ctrl + (/) for word navigation
  • Ctrl + a to select all
  • selecting with mouse (if possible through putty connection)
  • Ctrl + z to undo
  • Ctrl + s to save
  • Ctrl + n to create a new file
  • Ctrl + w to close
  • I'm trying to dig into emacs. There is a very nice distribution called spacemacs, which adds evil mode for vim emulation, and many other features. This was the first thing that I run into. It turns out there is a mode called cua-mode, that covers most of your requirements.
    – spelufo
    Commented May 22, 2015 at 0:06

1 Answer 1


If you are not fixed to these special shortcuts, mcedit might work for you:

mcedit with the "edit" menu opened (source: tuicool.com; click image for larger variant)

mcedit is part of the Midnight Commander file manager, but also can be used separately. I'm using it daily, and am pretty satisfied with it: it's fast, supports syntax highlighting, and you can extend it with your own specifications.

Let's see how it matches your requirements:

  • Copy/cut/paste: uses different hotkeys, rather inspired by those used for file operations: you mark text with F3 (alternatively, mark block-wise using F13 or via the menu shown in the screenshot.F5 copies marked text to where your cursor is (copy-paste), F6 moves it (cut-paste).
  • Select text: as described, hit F3 once, then move the cursor keys as you described to mark the selection, press F3 again.
    I've just checked: Also works exactly as you've described, by holding the Shift key while moving with the cursor keys – so "full match" here.
  • Word navigation: Exactly as described by you.
  • Mark all: Works, but again a little different: Ctrl-Home to move to the start of the file, then F3 to activate marking, Ctrl-End to mark to the end of the document.
  • Selecting with mouse: Works. Emulates the internal F3 marking when no key pressed, and "X-marking" (for your "global clipboard") with the Shift key pressed.
  • Undo: Yes, but it's Ctrl-U

A bunch of additional possibilities, like jumping to a given line number, search (and replace), and copying to / inserting from a "clip file" (to move text between files) makes this a "round thing". To play at your nick: PHP syntax highlighting included (I use it frequently to edit PHP files) :)

Midnight Commander is part of pretty any distribution's repository, and thus simply installed using apt-get install mc (Debian and derivates) or yum install mc (RPM-based distributions). Read more on mcedit by enlarging the screenshot, or follow up to the article it was taken from, or see the Midnight Commander's home page.

  • Thanks a lot for your answer. While it is a set of really useful stuffs, I still prefer a lightweight text editor with Windows-like keyboard shortcut. Commented Jan 1, 2015 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.