Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
2  
"No learning required" sounds like an unusually restrictive (and possibly unrealistic) criterion especially as you are asking for a CLI tool... –  jasonwryan Oct 3 '12 at 20:02
    
nano would be close. It wont have the exact same shortcuts but similar shortcuts to do the same operation. or you can create .nanorc and have custom shortcuts –  h3rrmiller Oct 3 '12 at 20:02
    
@jasonwryan As an experienced Windows (or Mac) user, I already have the learning required to use a modern text editor using only the keyboard. I'd like to use that same experience in a Linux CLI tool. –  Greg Woods Oct 3 '12 at 20:10
1  
The shortcuts you're expecting are Microsoft's modifications on IBM's CUA guidelines. Neither CUA nor MS's modifications are traditional in the unix world. –  Gilles Oct 3 '12 at 22:56
1  
@Gilles I'm not entirely sure I agree with calling those shortcuts "Windows" shortcuts. Every common GUI application that does text editing uses those shortcuts on all the major platforms. Many of those shortcuts predate Windows as well. –  jw013 Oct 4 '12 at 14:25

9 Answers 9

Try the FTE Text Editor. There are multiple versions available; the one you want is probably sfte which is in Debian's fte-terminal package.

enter image description here

share|improve this answer
    
A nice suggestion, but just trying a Shift+DownArrow to select text caused a load of 'FIXME' messages corrupting the screen. The shortcuts are straight from the eighties... Ctrl-Ins for copy? Alt-Backspace for Undo? Some of the options are pure linux geek: "Copy - Append"? I shouldn't have to read the manual for a Copy command! On the plus side I liked the directory browser when you start up. –  Greg Woods Oct 3 '12 at 21:23
    
Weird. The first thing I tried was Shift+DownArrow to select text, followed by Ctrl-C and Ctrl-V to copy and paste, since I figured that's what you'd try too. They all worked for me. –  Jim Paris Oct 3 '12 at 23:31
    
Hmm. Odd. I was in the terminal version which I obtained with sudo apt-get install fte-terminal. I'll give it another go when I have a few minutes. –  Greg Woods Oct 4 '12 at 21:20
1  
Same here. Maybe it depends on the terminal emulator in use; mine is xterm. –  Jim Paris Oct 5 '12 at 1:23
    
that makes sense, because Diakonos didn't work properly either. I'll have to look through the options available in PuTTY –  Greg Woods Oct 5 '12 at 7:53

joe is, IMO, the best of the editors-that-aren't-vi. It's a decent full-featured editor in its own right, rather than a stripped down featureless minimal editor like nano.

Default key-bindings are WordStar-like which have also been used in many other programs over the years, including the editor in the Borland Turbo Pascal & Turbo C IDEs, should be familiar to many users.

I'm too much of a vi user to use it myself, but I frequently recommend it to people who don't like or want to learn a modal editor like vi, with good results.

Here's the description in the debian package:

 Joe, the Joe's Own Editor, has the feel of most PC text editors: the key
 sequences are reminiscent of WordStar and Turbo C editors, but the feature
 set is much larger than of those.  Joe has all of the features a Unix
 user should expect: full use of termcap/terminfo, complete VI-style Unix
 integration, a powerful configuration file, and regular expression search
 system.  It also has six help reference cards which are always available,
 and an intuitive, simple, and well thought-out user interface.
 .
 Joe has a great screen update optimization algorithm, multiple windows
 (through/between which you can scroll) and lacks the confusing notion of
 named buffers.  It has command history, TAB expansion in file selection
 menus, undo and redo functions, (un)indenting and paragraph formatting,
 filtering highlighted blocks through any external Unix command, editing
 a pipe into or out of a command, and block move, copy, delete or filter.
 .
 Through simple QEdit-style configuration files, Joe can be set up to
 emulate editors such as Pico and Emacs, along with a complete imitation
 of WordStar, and a restricted mode version (lets you edit only the files
 specified on the command line).  Joe also has a deferred screen update to
 handle typeahead, and it ensures that deferral is not bypassed by tty
 buffering.  It's usable even at 2400 baud, and it will work on any
 kind of sane terminal.

It is, AFAIK, packaged for all distros, and source is available at http://joe-editor.sourceforge.net/ - the debianised source should compile on Raspian if there isn't already a binary package.

share|improve this answer
    
Thanks for suggestion. It may be useful to someone, but I never liked the Wordstar style shortcuts. I may reconsider when I need a more feature rich editor. –  Greg Woods Oct 5 '12 at 7:59

Emacs comes with a CUA bindings mode. Add the line

(cua-mode 1)

to your ~/.emacs.

Joe is a small-to-medium text-mode editor with configurable keybindings. There is a set of CUA bindings (not in the standard distribution, I think, so install them in your home directory).

share|improve this answer
3  
Wow, there's a name for what I'm looking for "Common User Access" en.wikipedia.org/wiki/IBM_Common_User_Access Thanks for that! –  Greg Woods Oct 4 '12 at 21:25

Diakonos also conforms to most of the requirements:

Frustrated by those other console editors? You already know what keys to press in your GUI applications to open, save, copy, cut, paste and undo. Why should your console text editor behave differently? Answer: it shouldn't.

Welcome to Diakonos, the console text editor with a key mapping you practically already know. Easy to use and easy to configure, but potent in the hands of power users.

Debian package exists, I have no information about that requested flavor.

share|improve this answer
    
Thanks for the suggestion. I could apt-get in Raspian. Still can't shift-select and other functions. But as @jim-paris suggested, it's likely a terminal emulator problem. –  Greg Woods Oct 5 '12 at 7:55

Long story short: Use nano

You can easily customize nano to fit your requirements, especially regarding your desired keyboard shortcuts. To do so, have a look at the bind parameter which you can set in your local ~/.nanorc file. Of course, you can also download ready-made config files (see below).

You can bind key combinations modeled on Ctrl+ with a preceding ^ and Alt+ with M- ("Meta"). Unfortunately, there seems to be no way to bind combinations containing the Shift key. The nano defaults to skip wordwise are Ctrl+Space and Meta+Space. And as if that wasn't enough, you can't bind arrow keys neither. But maybe you can live with these drawbacks.

Because take a look at the bright side: As a matter of fact, there is a package on github, mostly containing improved syntax highlighting, but also coming with almost all of your desired keybindings. Install it by calling make, but be aware that your current ~/.nanorc will be overwritten during the process.

I think you should give it a try, even though that Shift+Arrow selecting seems to be one of your highest priorities. In nano, you would use Ctrl+A to initiate selection mode, so you don't even have to keep Shift pushed down all the time! And you can always use the Ctrl+Shift+X etc. shortcuts that your terminal provides. As you might have recognized, I am quite happy with nano, possibly partly due to being a former Windows user.


Edit: Here's a screenshot showing some of the pertinent key bindings in the bottom help bar.

Nano editor equipped with github.com/craigbarnes/nanorc settings package

share|improve this answer

Have a look at the Sanos editor:

http://www.jbox.dk/sanos/editor.htm

Only a 28k binary can do what all those other editors try to -- and fail.

It does exactly what the OP asked for:

Shift+arrows to highlight text

Ctrl-X,C,V for cut/copy/paste

You can also have several open files simultaneously, and "pipe" commands into it. For example, press Ctrl-P and at the prompt enter:

cat yourfile

and it will insert yourfile at the position of the cursor. This way the full power of the bash commands are at your disposal ( use grep to get only specific parts of the file inserted ).

share|improve this answer

Le is another solution. It is like Norton Commander ( of Midnight Commander fame ) but perhaps more intuitive.

In MC you press F3 to begin and end region selection, then use F5 or F6 to copy or move it. On le F5 begins selection and if you move forward, F6 will end it. If you move forward past a previous selection, F6 will add everything up to it, or if you move backward and press F5 everything up to it will be added. So you can use F5 or F6 as it if it were F3 in MC. If you press F5 and move backwards and press it again it selects that region. If you press F6 and move forward and press it again it selects that region.

To install use:

apt-get install le

or download the source and build ( I've tested it on Debian sid ):

http://lav.yar.ru/download/le/le-1.14.9.tar.gz

Here's the Debian package: http://packages.debian.org/sid/le

share|improve this answer

I have tried Nano, Joe, Pico etc. While they are easier than Emacs or Vi[m], they all have weird, idiosyncratic UIs unlike any other program since the 1980s.

But there are modern, CUA-compliant editors for Linux out there!

Someone recommended FTE. It is long-unmaintained, but there is a current fork called eFTE: http://sourceforge.net/projects/efte/

It's pretty good; for instance, it is able to trap the Alt key for menu access even when running in an X terminal-emulator window.

There is another one that I rather like as well, called Tilde, which is currently maintained and has recent packages available. http://os.ghalkes.nl/tilde/

share|improve this answer

Cream is a configuration of vim that is modeless and which uses all the keyboard shortcuts like Ctrl+X, Ctrl+V that you might expect.

Unlike Vim it isn't alien to people used to Windows GUI applications like Notepad. If you can use Notepad you can use Cream.

  • Can be used for config file edits
  • Text based as well as GUI
  • Available for Raspian flavour of Debian
  • No learning required for a Windows/Mac GUI user
  • 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
  • Mouse support for changing cursor position and selecting text
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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