Live data from Hacker News

Ask HN: Is Vim still worth learning?

news.ycombinator.com

31–40 of 93 posts

Re: Ask HN: Is Vim still worth learning?

#31
post #10

For system admin work, knowing the basics of vi can be really useful when you're suddenly faced with a non-booting system, but you don't need to know much - how to exit being the classic issue. I use vi/vim for really basic editing tasks and switch to something easier for anything more involved (geany being my current choice).

I came in to say this: Learn basic vi (not the extended stuff Vim added) and you'll rarely be out a text editor, even on very stripped down systems. (In my experience, only nano is more common, and that comes with a keystroke cheat sheet at the bottom of the screen while you're using it.) Learn Vim if you actually like vi and want a more featureful experience in the same basic paradigm.

For my sins, I've worked on an old HP-UX system back in the Before-Times and that once required knowledge of vi to get it booting - no nano on that system.

For more modern systems, you can end up in BusyBox and not have access to nano (I think you can specify that vi gets included in BusyBox).

Re: Ask HN: Is Vim still worth learning?

#33
IMHO na. VS code has too many plugins. I mean you can add the vim key-bindings, but searching in VS code and jumping between tabs is way easier. Yes VIM supports many open views, but at some point their size becomes an issue.

I always find it funny that people say if you add X, Y and Z to vim it becomes super useful. I translate that to mean.. if you add X, Y and Z it becomes about what you get out of the box when you get almost any IDE.

Re: Ask HN: Is Vim still worth learning?

#34
post #22

> [I] found the "hjkl" navigation difficult That's because you're doing it wrong! Hjkl are fallbacks to move a few characters, it has only a minor advantage over arrow keys are is probably not worth the effort of re-learning how to move a cursor. I would not recommend learning that as your first vim move. Just stick to cursors for moving individual characters at first. The real magic is in going back/forward words (b…

> There are plugins that, so far as I know, can do a lot of what an IDE can do I want to add that the converse is true too: there are a lot of plugins (for IDEs) that do a lot of what Vim can do. I personally use the neovim integration for VSCode and it's really nice.

Have you used the real vim a lot in the past? More than a few days of trying it out, I mean.

Probably you replied around the same time as I edited in:

>> Try it for one month and see if you want to go back to standard editors. Odds are, you'll want the best of both worlds, start looking for vim key binding plugins in IDEs, and end up like me with missing vim after all because those keybind plugins are usually not so great

It might just be me who got too used to vim bindings by now so that the suboptimal implementations are annoying. Or maybe the vim bindings in VSCode are particularly good, I haven't tried those. (I've tried them in real visual studio in ~2015 and it was so bad that I ended up using plain visual studio instead, then went back to plain vim on linux after my C# internship.)

Re: Ask HN: Is Vim still worth learning?

#35
post #29
post #15

Earlier quoted context omitted.

Maybe... but OTOH, the IDEs that come after VSCode will still follow the UI guidelines that have been established for GUI tools during the last ~40 years, e.g. having menus where you can find out which functions are available, and then memorize the shortcuts for the functions you use most often, rather than having to learn everything "up front" before being able to become productive. I suspect one reason for the long…

OTOOH, GUI tools often tie you to a specific workstation setup. VIM is already installed everywhere you need it and does not require you to have a workstation with a GUI

> GUI tools often tie you to a specific workstation setup.

VS Code and Android Studio can run on all major desktop operating systems, and more cross-platform IDEs are coming out.

> VIM is already installed everywhere you need it and does not require you to have a workstation with a GUI

The chances of you having a workstation without a GUI over the past 30 years has been pretty small unless you're a sysadmin.

Re: Ask HN: Is Vim still worth learning?

#36
post #22

> [I] found the "hjkl" navigation difficult That's because you're doing it wrong! Hjkl are fallbacks to move a few characters, it has only a minor advantage over arrow keys are is probably not worth the effort of re-learning how to move a cursor. I would not recommend learning that as your first vim move. Just stick to cursors for moving individual characters at first. The real magic is in going back/forward words (b…

> things like S to replace the line

what is this barbaric default binding, s/S shall be bound to the indispensable vim-surround! ;)

built in text objects are already nice combined with modifiers (e.g cw, ciw, caw, cW, ciW, caW), ramping it up a little bit with argument (ca, cia, daa), surround (cs"', cs([, ci", ca", viWS, dst), and indent (vii>) is stupidly powerful.

Once the [verb][modifier]{object} pattern clicked for me my mind was hopelessly infected and I could not ever go back to non-vim editors.

To me that's the risk of learning vim: if it starts clicking for you (which it may not, as pure personal fit, not elitism) then it becomes excruciatingly annoying to edit non trivial amounts of text and not have vim.

Re: Ask HN: Is Vim still worth learning?

#37
TBH I don't think it's worth it. I've been using vi in various contexts for 35 years now but it's just too clunky compared to modern IDEs.

Nowadays I just use a GUI, and only use vi for editing config files and the odd program on a remote system. But even that's being supplanted by editors with remote capabilities.

It's absolutely worth it to learn enough basics to edit files. Beyond that, only if you really dig the editor.

Re: Ask HN: Is Vim still worth learning?

#38
I'm a relatively new developer (hobby coding for 3 years, professional for barely a year) and I'd say it's definitely worth it. I've found once I got over the mental overhead of the basics of (neo)vim, it's been the most pleasant text editing experience of my life. I use Visual Studio for work and while it's packed full of great features, like its debugger, there is just too much going on and the shortcuts are just all over the place.

It took me some hours over a few weeks to get my neovim config going but once I did and got accustomed to the keybinds, I definitely found the time investment worth it. Especially for the decreased pain I feel in my hands and I don't have to move around as much.

If you need some help getting a neovim config going, Chris@machine has this very helpful YouTube series called neovim from scratch, which goes through some of the common neovim plugins and details a config in Lua. Gl :)

https://www.youtube.com/playlist?list=PLhoH5vyxr6Qq41NFL4Gvh...

Re: Ask HN: Is Vim still worth learning?

#39
I am java dev as well, used Vim extensively in past, but unlearned everything and went to "normal" Idea.

Main problem I had was different keybinding on android, web browsers etc... Using Vim everywhere would be great, but I had to constantly shift between two very different styles. Very frustrating.

Another problem is that Vim sucks as IDE. You constantly have to babysit and debug plugins. Any advanced features will bring plugin conflicts... Compared to Idea it is a nightmare.

For terminal editing I use Micro editor.

Re: Ask HN: Is Vim still worth learning?

#40
I don't use VIM as daily driver or IDE - but for editing any config files on Linux boxes basic knowledge of VIM is the best thing one can learn.

For using via SSH it is just so convenient that it does not use any control characters for basic stuff.

Post reply on HN