Text editors that run from the terminal.

CrazedNerd

Gold Member
Gold Supporter
Joined
Mar 31, 2021
Messages
593
Reaction score
235
Credits
5,017
I posted a thread a while ago asking people what their favorite text editors are in general, I want to ask here about which terminal text editors you prefer, or your thoughts/opinions on them. I recently stopped using gedit because i realize using tab shortcuts in general disturbs my workflow in comparison to tabs. I've started using terminal tabs with Vim instead. However, i'm not really a huge fan of how Vim is configured from the start even though it's a neat program. Here is my .vimrc file:

Code:
"files must be closed/re-opened for this to take effect"
"creates line numbers"
:set number

"causes F1 to mean ':w Enter'"
nnoremap <F1> :w<CR>

"causes F2 to mean ':wq Enter'"
nnoremap <F2> :wq<CR>

"turns on cursor selection"
set mouse=a

This makes saving/quitting really fast, plus gives me what i liked about gedit and allows me to jump to the end of the document etc. the Vim way. It's cool to be able to erase a line with "dd" in normal mode, but not cool to have to get to a word i want with "33l" and ridiculous stuff like that that requires lots of counting and memorization.

From what I understand, both nano and nice editor have a lot of configuration capacity as well, but not sure if you can do everything i've done here...
 


JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,517
Reaction score
2,155
Credits
10,929
Vim, always vim - in the terminal, in the GUI and even in other editors (where vim plugins are available, with vim-like keybinds and behaviours.)

At some point I’ll share the most interesting/useful parts of my extensively modified .vimrc!
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
6,729
Reaction score
5,871
Credits
54,190
I've forgotten (it was largely muscle memory) the vim bits that I used to know - 'cause I've not used it much in a long time. At one point, I was going to go back and relearn, but I only got as far as compiling resources. Of all of them, this actually looked the most approachable:

 
OP
CrazedNerd

CrazedNerd

Gold Member
Gold Supporter
Joined
Mar 31, 2021
Messages
593
Reaction score
235
Credits
5,017
I've forgotten (it was largely muscle memory) the vim bits that I used to know - 'cause I've not used it much in a long time. At one point, I was going to go back and relearn, but I only got as far as compiling resources. Of all of them, this actually looked the most approachable:

i learned typing through typing video games...it's really funny, when i was in middle school computer lab they made us play mavis beacon to learn how to type, but i didn't just because i hated it so much and didn't really understand how to learn anything. When i was learning computer skills a few years ago, i figured it wouldn't hurt to try it again, but instead not hating it...it only took a couple hours before learning how to type quickly.

Vim gets pretty addictive after using it a few hours...besides more developed IDEs i'd say it's the best text editor possible just because of the huge number of possibilities...i can understand why anyone would hate it or not want to use it though, it has a very steep learning curve. You can program it so that it's a lot faster than an IDE though, i'm not there yet...
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
6,729
Reaction score
5,871
Credits
54,190
I learned to type when IRC was new. Prior to that, I hen-pecked many thousands of hours. When IRC rolled up, I just refused to look at my keyboard and memorized the backspace key's location. These days, when I take a typing test, I'm generally over 80 wpm and sometimes over 90 wpm. All 'cause I refused to look at the keyboard to chat on IRC...

These days, nano meets my needs. I don't actually have much in the way of needs.
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,472
Reaction score
1,074
Credits
9,160
I use echo

Almost as good as edit it in notepad and paste it to the terminal.

I'm surprised no one mentioned pico (before nano)
It was the editor built into 'pine'. A console based email client.
If you think vi is difficult. Try emacs. :)
 
OP
CrazedNerd

CrazedNerd

Gold Member
Gold Supporter
Joined
Mar 31, 2021
Messages
593
Reaction score
235
Credits
5,017
i'm really surprised how much vim users in general like the hjkl keys for navigation...today i switched them back to the arrow keys, and man is the program so much easier to use:

Code:
nnoremap h <Left>
nnoremap j <Down>
nnoremap k <Up>
nnoremap l <Right>

not only can i hit "2<Up>" and very effortlessly/quickly jump two lines, but Visual Line Mode and Insert Mode both use the arrow keys, i hate having to think about directional keys in a different way between the modes...i've been addicted to fooling around with vim for a week now, such an awesome program! I'm going to get murdered for my key mapping, i know it!
 

SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
314
Credits
3,611
My go-to console editor is nano, if for nothing else than it's ubiquity and my muscle memory. Used it since my entry into Linux. I've configured a color scheme for it, which makes it a bit nicer.

I'm surprised no one mentioned pico (before nano)
I used pico in the 90s as part of my employer's mail service. Was it also a standalone editor?

My next go-to would be micro, which has a more modern key binding (Ctrl-Q to quit, Ctrl-S to save, etc.), mouse support, and color theming.

Never could quite grasp vi/m editors, and never found a really good reason to learn them.
 

osprey

Active Member
Joined
Apr 15, 2022
Messages
145
Reaction score
77
Credits
1,306
I can't remember where I heard this, but it may have been a comment by Linus, but it may be mangled:
"the measure of a programmer is to be able to write the kernel with cat".
 

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
499
Reaction score
406
Credits
6,114
My go-to console editor is nano, if for nothing else than it's ubiquity and my muscle memory. Used it since my entry into Linux. I've configured a color scheme for it, which makes it a bit nicer.


I used pico in the 90s as part of my employer's mail service. Was it also a standalone editor?

My next go-to would be micro, which has a more modern key binding (Ctrl-Q to quit, Ctrl-S to save, etc.), mouse support, and color theming.

Never could quite grasp vi/m editors, and never found a really good reason to learn them.
Nano supports Ctrl+S in Debian 10. Found that out by mistake (muscle memory).

<joke>
I use echo and >>. Works wonders.
</joke>
Nah, printf, saves you using -e for multiline stuff.
 
OP
CrazedNerd

CrazedNerd

Gold Member
Gold Supporter
Joined
Mar 31, 2021
Messages
593
Reaction score
235
Credits
5,017
I'm actually kind of dissapointed by vim's keyboard mapping...there's actually a lot you can't do, plus i decided to go back on the arrow key adjustment i made and nothing works to get rid of it, not even getting rid of the .vimrc file temporarily.
 

Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,468
Reaction score
1,185
Credits
10,653
I use nano; simple and easy to use. I also use kate on the GUI side, it has a vim mode, too - which I never use lol. Oh, another one I've been playing with lately is cuda text; quite handy, if you ask me. There's a lot of add-ons/plugins available you can install to extend its functionalities, too. https://sourceforge.net/projects/cudatext/files/
 
OP
CrazedNerd

CrazedNerd

Gold Member
Gold Supporter
Joined
Mar 31, 2021
Messages
593
Reaction score
235
Credits
5,017
I use nano; simple and easy to use. I also use kate on the GUI side, it has a vim mode, too - which I never use lol. Oh, another one I've been playing with lately is cuda text; quite handy, if you ask me. There's a lot of add-ons/plugins available you can install to extend its functionalities, too. https://sourceforge.net/projects/cudatext/files/
Yeah I'm coming over to the nano camp as well...vim has lots of features but I can't stand the modal thing, especially since we are not in an age of terminal computers. Plus, nano has all of vims best features...you can still jump to the end of the document in a flash, there's still text search, and there's keyboard mapping. Nice editor has macros, but I don’t see the purpose outside of a spreadsheet type program.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,510
Reaction score
6,353
Credits
26,563
I'm surprised no one mentioned pico (before nano)

Pico and Pine had licensing issues so they were not included for Linux, hence Nano sought to duplicate the best features of Pico.

Wiz

Avagudweegend
 

Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,468
Reaction score
1,185
Credits
10,653
Plus, nano has all of vims best features...you can still jump to the end of the document in a flash, there's still text search, and there's keyboard mapping.
Yeah, like I said, it's simple and easy to use yet feature-packed. One of the keys-combo I use quite often is Alt + A to mark a line, then with the arrow keys select text, then Alt + 3 to comment out those lines. :)
 

SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
314
Credits
3,611
Pico and Pine had licensing issues so they were not included for Linux, hence Nano sought to duplicate the best features of Pico.
According to apt:
Code:
$ apt show alpine-pico
Package: alpine-pico
Version: 2.24+dfsg1-1
...
Description: Simple text editor from Alpine, a text-based email client
 "pico" is a simple but powerful text editor.  It was originally the pine
 composer,  the editor used by the pine email client for writing email messages.
 .
 It has gained popularity since its initial use in that context and is now used
 as a stand-alone editor by many users.
 .
 It is similar to but less powerful than GNU Nano, an editor created with the
 pico interface when the pico license was non-free.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
6,729
Reaction score
5,871
Credits
54,190
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Latest posts

Top