r/programming • • May 23 '17

Stack Overflow: Helping One Million Developers Exit Vim

https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
9.2k Upvotes

1.1k comments sorted by

View all comments

102

u/Veliladon May 23 '17

Nano helpfully puts the shortcuts for what you're looking for down the bottom. That's why I use it instead of VIM.

114

u/Deto May 23 '17

If you use your text editor often, though, it's kind of a waste of space to just list common keyboard shortcuts. I mean, imagine if Word had a pane at the bottom with things like "Ctrl+C: Copy, Ctrl+V: Paste, Ctrl+Z: Undo". Kind of silly.

It's nice for people who don't spend much time editing text in a console, though. Definitely a better default than Vim.

17

u/skinky_breeches May 23 '17

Pretty sure Word has that pane at the top and gives you the ctrl + command when you mouse over the button...

47

u/freeradicalx May 23 '17

Nano is a great default. But after you learn vim, going back to nano feels awful.

-2

u/atomheartother May 23 '17

I can't tell if you're joking, does anyone actually use nano for anything else than "emergency text editor when nothing else will run for some reason" ?

37

u/jokullmusic May 23 '17

I use it because the vast majority of my text editing is outside of the CLI & it's easy to use & it works perfectly fine. I don't have any reason not to use it.

→ More replies (2)
→ More replies (15)

9

u/[deleted] May 24 '17

If you use your text editor often, though, it's kind of a waste of space to just list common keyboard shortcuts.

If you use it often you have time to learn to set set nohelp in your nanorc.

Heavy users are already going to hate your settings and have a custom setup, why try to tailor the defaults to them instead of being useful for people without custom settings?

→ More replies (1)

8

u/MoarVespenegas May 24 '17

Imagine if Word had a straightforward and intuitive user interface and a help section.

3

u/SmelterDemon May 24 '17 edited May 24 '17

Uhh Vim has an excellent help feature

→ More replies (9)

41

u/JavierTheNormal May 23 '17

You can't really compare the two editors, but nano is great for beginners or more casual users.

17

u/[deleted] May 23 '17

I think this is like the ONLY time this meme is useful - https://i.imgflip.com/1pl4xq.jpg

9

u/[deleted] May 23 '17 edited Apr 18 '19

deleted 0.8628 What is ^^^this?

0

u/[deleted] May 23 '17

[deleted]

→ More replies (1)
→ More replies (29)

16

u/[deleted] May 23 '17

That's wasted screen space after your first hour of using it though.

17

u/calrogman May 23 '17

You can hide the shortcut list by invoking nano -x or pressing Meta-x. Of course, this is unintuitive and you need to read the manual to know this, so basically nobody should use nano.

8

u/YouHadMeAtBacon May 23 '17

Or you can stick it in your config file.

→ More replies (1)

2

u/fripletister May 24 '17

You can hide the shortcut help footer. Nano is actually quite customizable.

0

u/[deleted] May 23 '17

[deleted]

2

u/[deleted] May 24 '17

Vim is a terrible editor if you don't use it very often. I use it all the time and I have all of my config files setup and plugins installed, so I love it. But if you only use it occasionally I wouldn't bother.

→ More replies (4)
→ More replies (8)

10

u/icantthinkofone May 23 '17

Because you struggle mightily, on a daily basis, to remember that :wq saves your file and quits vim?

7

u/Elathrain May 23 '17

No, because after they hit random buttons they're in the middle of some command and typing :wq does something unpredictable. Maybe they're in insert mode and it goes into the doc, maybe they've just hit d and they delete a word and enter macro mode.

They need someone to tell them to spam ESC a bit before quitting.

2

u/Veliladon May 23 '17

I know :wq is write and quit but that's about the only thing I know. I don't even know what the equivalent of nano's Ctrl-W whereis to find a string in a file is in vim. This is pretty much a necessity for doing something involving config files.

4

u/[deleted] May 23 '17

/followed by the string.
There's a great tutorial included in vim called vimtutor if you want to learn it :)

→ More replies (2)

8

u/[deleted] May 23 '17

Micro is even better - it actually uses standard shortcuts! Text editing like its 1995.

→ More replies (1)
→ More replies (35)