What's is the best text editor to use from command line?

5    17 Mar 2016 16:58 by u/Nokilter

Nano is all I've ever used command line wise and the thought occurred to me, you more experienced programmers may of found a better one.

17 comments

7

Nano, everything else has this annoying dependency called 'autism'.

1

golf clap

everything else has this annoying dependency called 'autism'.

....There is much truth in this.

I'm gonna have to second Nano for most daily usage although Vim is my goto for some specific tasks like nuking entire lines, ensuring there are no extra line breaks, cursing over wrong/forgotten shortcuts, etc.

Spend a little time with each and see which you prefer or what sticks.

1

some specific tasks like nuking entire lines

ctrl+k

cursing over wrong/forgotten shortcuts

got it

0

ctrl+k

Oooo Thanks.

3

I'm a vi guy, but I'm old. The only thing I ever miss when using it that emacs has is column search/replace. In every other respect, I like how lightweight/portable/powerful vi is. Do yourself a favor, however and brush up on your regular expressions to truly reap the benefits of this editor. Knowing vi will also help you with other tools like sed/awk.

One caveat. Since you are asking this question, I assume you aren't a LISPer. If you're about to head down the LISP path, emacs+SLIME is the way to go.

1

Have you tried visual block (Ctrl-v) + :s? You might also need something like vim-easy-align to align stuff into columns. It seems like that would do column search/replace, although I don't know emacs so I'm not sure if it's similar.

1

Thanks. To be honest, the column stuff was a requirement back when I was editing test vectors (semiconductor test stuff). It rarely comes up in "real" editing. In that one use, however, emacs was a lifesaver.

2
1

nano is pretty good but if you want real power when editing in the console, Take up xemacs. Just a warning, though, you may need to grow additional fingers to use it effectively.

1

Depends what you want to do.

Are you looking to edit a text file, quick n dirty? Use nano.

Do you want a console editor as a part of your development environment? Use vim.

Emacs is cool too, but I found the learning curve to be steeper than using vim.

1

I like vim for console editing, but if i have a choice i find myself using sublimetext instead

1

I'm gonna be the guy who's different and say that I prefer 'joe'. I got it when I first cut my teeth on Linux in the 1990s. It was a very popular text editor to include on the distributions available back then, including the micro-distros that sat on UMSDOS (think along the lines of the rough equivalent of a modern Linux Live CD).

Joe is not as powerful as vi or emacs by any means, but a lot of the time, you don't need that much. At the same time it's a world better than nano/pico/etc., in my experience.

That said, I'd love to see a text editor of the style of the old Borland C++ text-mode DOS IDE's, available for Linux and Win32. I don't know how likely that is, though, since I'm pretty sure nobody bothers to use GPM (a package for mouse interaction at the console) anymore, though there are a few packages that seem to be able to use the mouse via X-based terminals for operations other than copy-and-paste.

0

I like Vim, because after a few key remappings, I almost never have to leave home-row, which is great for a touch typist. Some IDEs have Vim simulators, but I've found most of them have some flaw or another.

0

Indeed. If you don't already, this is the most important line in my .exrc file:

map ; :

It'll change your life.

0

Thanks. I had to look at that for a minute or two to figure out what you were doing, but I figured it out. I added it.