HACKER Q&A
📣 harco

Is Vim still worth learning?


Dear HN community,

since there are quite some comments highlighting the effectiveness of a good VIM setup and muscle memory of 10+ years, I would like to know your opinion on starting to get into it now (end of 2022).

For context: I'm a backend developer with 10+ years of experience, mostly using Java IDEs, and lately some vscode (for go, typescript, rust). I have some knowledge in vim, and can use it for basic text editing, but I still use the arrows for navigation, and found the "hjkl" navigation difficult. I'm somewhat experienced using linux and the terminal, and would be curious to dig deeper into more terminal-based workflows.

The question is: do you think it's worth the effort to learn using VIM more deeply today? The goal would be to at least be able to do the go and rust coding in vim, it doesn't need to be a full Java IDE. Bonus points for an opinion about "If yes, do you think VIM is still fine, or rather neovim? Or something fresh like helix?"

Thanks a lot!


  👤 peterbraden Accepted Answer ✓
Yes definitely. Vim will be around for the rest of your career, long after VSCode or other IDE's have come and gone. Investing in tools and workflows that are properly open source, and have serious longevity has a big payoff.

👤 johncoltrane
For context, I have been using Vim as my main driver for 12+ years, now, and I have been heavily involved with the ecosystem (patches, plugins, support, etc.) for most of that time.

Learning enough Vim for it to pay off in terms of productivity and whatnot is quite a journey. If you are committed, it might take a couple months to follow chapters 1-12 and 20-32 of the user manual, which will put you in a better position than most Vim users. If your goal is really to be able to use Vim for Go and Rust projects, then there is no way around that first step, but if you somehow don't go all the way, then what you have learned will surely come handy next time you have to use Vim so there is no loss, here.

> do you think it's worth the effort to learn using VIM more deeply today?

I did that and I really love where I am. Will it click for you? I have no idea.

> If yes, do you think VIM is still fine, or rather neovim? Or something fresh like helix?

- Vim (not VIM) has been in active development since 1991 and it is not showing signs of slowing down. It is more than fine.

- Neovim is merely a fork with different goals. At a low level, the two tend to diverge more and more but when it comes to the core user-facing stuff like Ex commands, modes, operators, motions, etc. there is practically no difference.

- Helix seems promising but it is far less ubiquitous than Vim.

Everything is worth learning, whether you have an immediate use for it or not.


👤 ndsipa_pomu
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).

👤 Darkstryder
Vim is basically the only editor you can safely assume to be available on any machine you’ll ever interact with. In my opinion, this fact makes it a requirement for virtually any developer to be able to confidently use vim during a production incident to, say, fix a broken config file while being connected to the machine through (multiple hops of) SSH, without any ability to use your editor of choice.

Once this basic-but-crucial skill level is mastered, using vim more proficientely as a daily driver is entirely a matter of taste. Personally I prefer using a fully-fledged IDE for anything that goes beyond a simple script.


👤 kstenerud
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.


👤 tmarice
We need an interface to translate our thoughts into the computer, and the keyboard and the mouse are a necessary evil for now. But if you chose a career of software development, you should strive to minimize the friction that interface introduces.

In my opinion, Vim/Emacs are the best way to make that interface as easy to operate as possible, since it completely removes the mouse from the equation. Along those same lines, I felt so much liberated after switching to i3, insomuch that I try to replicate the experience on MacOS, after switching over for work.

EDIT: Also, the obligatory "You don't grok vi" SO answer: https://stackoverflow.com/questions/1218390/what-is-your-mos...


👤 3D25157725
No I don't recommend -- and I am a daily vim user for years. I program mostly in C, sometimes C++. I use i3 on my desktop and tmux when remote/ssh'd into a vm. Inside vim, I use the bare minimum of plugins to reduce dependencies/complexity. I use ctags for getting around, as well as the built in features. gdb in a terminal window next to my vim window source. It's fine and snappy and does everything I need.

I live in a terminal except for the browser. Of course my xterm bindings are always vi-mode and tmux too. I have key bindings to unite all my i3/tmux/vim 'getting-around' keys and also fought that fight to unite the clipboards, even across VMs etc.

Getting back to why I say 'no' is because once you're used to the modal, and getting around with the usual vim motion keys, it makes using anything else near impossible and clumsy. I have great difficulty composing text in browser (like right now) and also emails, etc. And if any editor online allows vim keybindings, you must make sure that you are used to defaults otherwise the vim-mode won't do you much good. Like escaping with CTRL-[, or delete word with CTRL-W, which closes the tab in the browser (firefox and chrome and I never found a way to turn that off, so I lose a lot of work that way). For instance godbolt and leetcode both had vi-modes but there's enough of a difference, even though I try to use nearly all defaults, that I still end up composing any code/english in another terminal window.

I am completely hopeless using a mouse or arrow keys. If I have to go to on-site interview and have to use something other than vim, well it makes me look like I haven't sat down at a computer in 15 years. I am a hostage now to my habits and am very wary of hopping over to VSCode/CLion/jetbrains whatever else because I will be a fish out of water.


👤 growt
If you just want to learn the basics, you'll be faster with a "modern" editor with mouse and some basic keyboard shortcuts. But if you really master Vim, I would say it's faster and more powerful than any modern editor (and you can use it as an extension in VSCode). For me it's mostly navigating ( 213gg - takes you to line 213, $ - end of line, t) - next closing parenthesis,% jumps to opening closing parenthesis or similar when you're on it, and so on). Macro recording: qe - records macro in "e" ... do vim stuff ... q ... 10@e - execute your macro 10 times. Text substitution with regular expressions (:%s/th(i|u)s/that/g). I think it's not about "hjkl" navigation, that is a probably the tiniest improvement in speed (not lifting your fingers from the home row). But if you master the navigation part and learn how to solve more complex editing tasks with macros and regular expressions, then you'll be a lot faster than in a regular editor.

👤 sublinear
My workflow for years has been using vscode for editing code only and completely ignoring most of its plugins and other features.

The work-issued machine may run windows or macos, but my dev environment always matches the testing/production environment and that's linux (usually ubuntu).

I always have several terminals open for git, docker, tailing logs, watch scripts, etc. Vim is really the only sensible option for editing configuration, writing git commit messages, _viewing logs_ ... can't stress that last one enough. What are you going to do when you need to do more than just grep a single log file? You need an editor that doesn't blow up opening massive files.

Yes it's absolutely worth knowing. Everyone who uses it needs it and everyone who doesn't eventually will.


👤 avnigo
Worth it? Absolutely, without a doubt. Should you? Only if you find it fun, especially if you prefer the keyboard to the mouse, although you can definitely use the mouse in vim too.

I would go with neovim over vim nowadays, and if you want something more familiar that will get you up and running more quickly, try AstroNvim [0]. Later on, if you also like to tinker, you can set it all up just the way you like it.

I've heard of vim being called a PDE (personalized DE) [1], and I think that makes a lot of sense.

[0]: https://astronvim.github.io/

[1]: https://www.youtube.com/watch?v=QMVIJhC9Veg


👤 crnkofe
Not sure why there's a `still` in the question. As long as there's text files to edit there will be a good reason to learn Vi(m) or any other console/text/GUI editor.

Here are some reasons why I use it:

- it's fast

- works consistently well over SSH/in docker containers/remote

- can use it pretty much everywhere and if it's not installed it's easy to setup

- awesome for doing quick text edits or text manipulation (I prefer Vim to sed/awk or anything else)

I don't Vim as an IDE replacement since I find it just takes too much time to maintain a working setup. I'm also not a fan of addons/plugins as over time they tend to fall apart.


👤 simonblack
Yes. Definitely.

Disclaimer: I don't often use a modal text-editor like vi/vim, I use one like emacs that employs control-codes. ('jstar', a clone of the WordStar that I've been imprinted with for nearly 40 years)

All UNIX systems have vi/vim built-in. It pays to have a working knowledge of it, even when it's not your everyday text editor. It's got me out of a few emergencies with recent installs over the years. (Broken /etc/fstab, anyone?)


👤 ZeroGravitas
If you're using vscode there's a book about learning vim inside it that's worth a look:

https://www.barbarianmeetscoding.com/boost-your-coding-fu-wi...

Core pitch:

> You may be wondering... Ok. If Vim is so good then... Why not just use Vim instead of Vim inside Visual Studio Code?

> Great question! The truth is that setting Vim to work with a feature set similar to modern text editors is not a trivial task. Features likes code completion, code navigation, in-editor error messages, etc, although supported by Vim don't work perfectly out of the box.

> Visual Studio Code and Vim together offer a very sweet spot that balance the ease of setup and super rich development user experience of Visual Studio Code with lots of the amazing features present in Vim.

> The translation is not yet perfect though. And if you're an experienced Vim user you may find some features missing. But all in all, VSCodeVim offers a very pleasant Vim experience outside of Vim.


👤 timka
40+. Have been viming since 1999-2000. SublimeText + vim mode has been my weapon of choice since like 2012-2013. It works out of the box and is the most compatible with my muscle memory (tried VSCode's vim emulation, RealVim, PyCharm's vim mode — hell, it's 120 chars per line by default). Onivim2 seemed promising but it's still not there.

What I really like in Vim is not Vim itself, but modal editing, mouse-free navigation, staying at the home row. Ideally I would like this model to be universally available across my environment. Like MacVim but everywhere. Plus, a trackpoint at the home row (really loved IBM ThinkPad).

Home row is great but it's so much addictive that you want it everywhere, but I still haven't found a universal way. I bought a UHK[1] and learn how to use it and Karabiner elements complex modifications.

Also these days I tend to think that physical navigation (characters, words, lines, paragraphs…) is really not what I should think about when working. So lately I've been exploring helix and projectional[2] (structural[3]) editors.

My younger colleagues are sometimes so awkward in terminal so I've been thinking about investing some time into setting up a well tuned and documented shell environment for them somewhere. I think I'd start with this awesome article[4].

[1] https://ultimatehackingkeyboard.com/ [2] https://www.alexeyshmalko.com/20200830010958/ [3] https://github.com/yairchu/awesome-structure-editors [4] https://www.masteringemacs.org/article/keyboard-shortcuts-ev...


👤 ormaaj
You don't need to master vim as some other commenters seem to think. I've been using vim for 10+ years, but have relatively little of the manual committed to memory. You can learn enough to be productive in a day. The muscle memory comes quickly especially if you align your other tools with it. For example I run my shell's line editor in vi mode, have my window manager configured for keyboard-driven operation with a vi-like navigation scheme, `:set -g mode-keys vi` in tmux, and use one of the vimperator clones in my browser. So I never go very long without using the same patterns.

👤 dezzadk
Vim is way more customizable and portable than any gui editor imo. An extreme amount of filetype support is builtin to the vim runtime, try to peek how many definitions there are in the src/runtime path on github.

I think its well worth it. Even for the macros, normal commands there is no more efficient way to edit text.

If all touch keyboards had vim-mode we'd all be more productive on smartphones. People who use vim over ssh on mobile devices knows this. I've remapped the record macro (q) to (qq) on mobile devices and put my normal-mode leader key on q, it works really well.


👤 animuchan
IMO learning Vim today is absolutely worth it. Vim is a sort of "lowest common denominator" thing in text editing, it works great for SSHing into remote machines, `docker exec` into containers, and making changes when sitting next to a coworker who uses an insufferable (or badly configured) GUI editor.

As for the second question, differences between regular vim and neovim largely don't matter for learning vim, as the bulk of the changes is behind the scenes. Some plugins will depend on a specific vim version, but your muscle memory probably won't.


👤 half0wl
Generally, yes. Learning how to navigate will help you in any *nix systems.

> since there are quite some comments highlighting the effectiveness of a good VIM setup and muscle memory of 10+ years, I would like to know your opinion on starting to get into it now (end of 2022)

I think this is not a good mindset to have. Knowing what's effective and building that muscle memory will take a long* time. If you approach thinking that "this is going to make my productivity fly because other people said so," the learning curve will flatten you and make you sad.

IMO, do it for curiosity's sake - having a hacker's mindset in the beginning will smooth that curve out!

As a testimonial mirroring other comments in this thread: you really can't go wrong with it once you get the hang of it. My experience with vim has been always positive & I've never had to change the core of my config for years. 99% of every LoC I've written in the past 10 years has been in vim. Every time I had to use/try a new editor, vim keybinding is the first extension I install (or setting I enable). It has helped my RSI a bunch (huge QoL improvement) and this is especially crucial with laptops: no more trackpad fiddling in the middle of typing!


👤 throwaway_au_1
If you subscribe to the Unix Philosophy and like to use your tools in in such ways, yes. If you want to point and click* (no hate - I just mean you just want to get things done) and composing small tools in novel, productive and repeatable ways doesn't interest you very much, I would say there's a chance you may struggle to see the benefit and motivation may drop off and your ROI may be low.

(yes Neovim supports mouse, don't @ me lol)

I started with Vim because of the modal editing (prompted by the classic in-person witnessing of a Vim user). I had just switched to the Workman KB layout so I was already slow and useless - why not be slow and useless for a while, but then have also learned Vim? I started out with the modal emulation in various editors, provided by extensions, but over the years I became more and more sick of Windows' BS and swapped to Linux for dev. This is when I encountered Neovim, and I now realise Vim is so much more than the modal editing.

As I wrote in another comment, working in code now without Vim feels like punching in a dream. I won't say I'll never leave Vim, but until there's something that allows editing as ergonomic as Vim's, startup as fast as Vim's, terminal/GUI options like Vim has, integration with basically anything like Vim can, and a lack of Big-Tech-BS like Vim has, then I'll probably just keep using it.


👤 Karsteski
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...


👤 uticus
> do you think it's worth the effort to learn using VIM more deeply today?

Only worth it on four conditions:

1. You are able to incorporate it into the tools you need - whether than be an IDE, a workflow that involves actually opening VIM, or whatever.

2. You stick with it, because the costs in terms of time and effort are big up front while the benefits start very slowly but build up later and faster with proficiency.

3. You aren't already using a good text editor or IDE that provides the benefits you're looking for. For example, the weird "hjkl" navigation is actually part of a bigger feature set that will run circles around basic arrow- and page-key navigation and editing (even with an IDE). But, if you're looking to benefit from regex features, why even most basic IDEs usually have that.

4. You have adequate muscle memory. You won't be fast and you won't gain proficiency if your fingers won't remember those keys and combinations.

...seems like a cautionary tale so far, so let me temper by saying I install wherever I can - including IDE plugins, etc. Microsoft (VS and Code) and JetBrains IDEs both have pretty decent plugins. I can say without boasting that I am faster with it at both pounding out text and editing text from all sorts of crazy languages and environments. And often times it gives me a speed advantage over my peers who don't use it. But that's only because I took time to become proficient at it and learn some of the tricks that are available.

> do you think VIM is still fine, or rather neovim? Or something fresh like helix?

VIM is fine in terms of stayability - it's not going anywhere. I'd say look at the alternatives only if you're interested in the special benefits they have over normal VIM.


👤 ftrobro
I found that for Go development vim is really good. I tried Sublime, Atom and VSCode for Go development on Mac, but didn't feel comfortable with how slow they were, especially when trying to dig into an SQL dump. It could take a minute for the SQL dump to load. In contrast to that, vim can load and jump to any line in a MB-sized SQL dump instantly. Another great thing about vim is that you won't need to use the mouse/touchpad, though as others have mentioned there are vim-plugins for VSCode etc if that's what you want.

Vim package suggestions:

scrooloose/nerdtree - File tree navigation. jeetsukumaran/vim-buffergator - Work in buffers instead of tabs. fatih/vim-go - Jump to definition, format, auto-import, build and jump to error lines inside vim, etc.


👤 fimdomeio
I use neovim. my experience is that gaining muscle memory with vim is great. Sometimes you start hiting the escape keys in websites and other places where it does not work but other that is a really nice experience. I never took too much effort to optimize every keystroke. I just learned new ways to navigate as needed. Coding in go and the plugins work very well. Things I dislike. neovim changed the plugin system a lot (they introduced lua as the preffered scripting language instead of vimscript right?) and for me that likes to rebuild the config once every 5 years or so, stumbling on a complete new way of doing things made lose a bit more time than I wanted and was a bit of a frustrating experience.

👤 WirelessGigabit
My biggest issue with Vim is that there is no IDE which has perfect Vim integration / emulation. It always feels a little bit off. And I really want an IDE for debugging purposes.

Thankfully Neovim is getting better at debugging, so maybe I'll go that direction.


👤 tombh
I've always found it curious that Vim is most often associated with modal editing. I consider it to be so much more than that; highly customisable, huge plugin ecosystem, ubiquitous, lightweight and works in the terminal.

Modal editing never stuck with me, I just ended up writing more and more conventional shortcuts, so much so that I wrote my own "No Vim" mode plugin [1]. Just like VSCode and other editors have "Vim mode", so too does Vim have a "conventional mode".

So don't let modal editing be a factor in your considerations.

1. https://github.com/tombh/novim-mode


👤 worldsavior
Vim is fast, in performance and in productivity. Every key has a purpose, which you can define it to whatever you want, and create your own macros.

Everything is a shortcut, which makes it very easy to navigate, replace and much more. For example, replacing is very easy in vim: you can use substitution, r key, while in other IDEs you need to go to a menu or press on some button or other but not as easy in vim. For me navigation in vim changes my productivity, in terms of getting to EOF, end of line or other. This is my personal opinion, but you might feel more comfortable with a normal IDE.

Also note that learning vim can take some time and patience is a must.


👤 williamvds
My main selling point is no longer feeling like you're fighting your text editor. Once it's muscle memory you focus very little on the act of editing, just on what you're writing.

With more advanced stuff like macros and substitutions, tedious reorganisation/refactoring becomes much faster.

And you can slap on IDE-like features with language servers and the like. It isn't as powerful as an IDE, but it will also be much less complex. Or use a Vim plugin for your IDE and accept the tradeoff: losing Vim features for more IDE features.

It takes a while to learn the editing model and hence get a return on your investment, so keep that in mind.


👤 julvo
Yes 100%. Using the vim bindings for VS Code and that works great. Makes working without touching the mouse really enjoyable. Also being familiar with vim is a great fallback option if you're sshed into a remote machine.

👤 alisonatwork
I've been using vi for over 20 years and I still use arrows for navigation unless I'm on an absolutely hideous terminal that refuses to handle arrow keys properly. And even then you can usually do some termcap/terminfo magic to make arrows work properly not just in vi but all your curses apps.

There are some die-hards who refuse to take their fingers off the home row to do anything, but in reality the milliseconds you might shave off here and there by using hjkl instead of arrow keys, or elaborate vim commands instead of OS-native keyboard navigation, they're never going to add up to the hours you spend peering at code trying to figure out what it does, or waiting for a compile, or running unit tests, or a million other things developers do every day.

That said, I still use (and maintain) a vim extension for VSCode. I use vi/vim style navigation almost every day at work, on and off, alongside OS-native keyboard navigation and IDE-specific shortcuts. The value of knowing vi is that any time you are logged into a remote server you can just run it and know it will behave the way it always did.

My personal recommendation is learn vi "to an acceptable degree" and then stop. vi is the thing that is available everywhere. Busybox-based distros like Alpine and the BSDs don't have vim out of the box, and some container-based versions of established distros like Fedora have a very cut-down version called vim-minimal, so if you start to depend on more advanced vim features, you will be annoyed or confused when you are in an emergency situation and they aren't there.

Personally I don't think it is worth the effort to learn esoteric vim commands or trick out your install, unless you are interested in it just for the sake of learning something new. A lot of vim users will tell you it's worth the effort, but they can't really be objective because of the sunk cost of having spent so much time learning it and setting it up in the first place. My .vimrc is about 20 lines, the first of which is an exact copy of the .exrc I've been using since 1998. When vim is available, it gives me a slightly nicer experience than vanilla vi. When it isn't available, I can still do everything I need to do. And when I'm in VSCode and the muscle memory tells me to df- or JJJ, well that works too.


👤 throw6383878
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.


👤 rgoulter
Some strengths:

1. vi is ubiquitous. So if you're even in a situation where you SSH into another machine, knowing how to use the basics of vi is valuable.

2. vim's modal editing is very expressively powerful. That's why vi-emulation (or now embedding) plugins are so popular. -- Yes, it's worth learning enough of vim's motions here. (My favourite example is e.g. `printf("hello| world");`, you can type 'change text inside `"`' using the sequence `ci"`).


👤 timka
OTOH, I know an IT professional, a computer nerd, who types using his two index fingers while looking at the keyboard.

Some people do have very difficult relationship with their bodies.


👤 sys_64738
I would say basic vi skills are mandatory for anybody who is needing a console. I remember one case of having to plug in an ASCII terminal and the only tool available was vi for the console. I do notice nowadays that the dependence on VS Code means a lot of developers struggle with skills on the console so to edit a file on a remote server they need to copy it from and back to the server. This is going to be an issue in years to come.

👤 SPBS
My honest take as an experienced vim user is that you could use vscode for the rest of your life and not miss a thing.

There's nothing inherently virtuous about using vim keybindings to edit vs standard OS keybindings. It won't make you a better programmer.

The real value is it lets you live in the terminal (and become more proficient at the command line as an extension). If you're living in a Java world, most things are done with GUIs and IDEs.


👤 john_the_writer
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.


👤 johlits
I use the Visual Studio VIM extension and I love it when I don't have a mouse. Keyboards change layout but the QWERTY keys stay the same.

👤 computerfriend
> I'm somewhat experienced using linux and the terminal, and would be curious to dig deeper into more terminal-based workflows.

Then yes. Learn Vim because you're interested and because it makes text editing fun. If you don't enjoy it, stop. In the worst case, you've still learned the basics of a useful skill.


👤 zadwang
Vi was designed for very slow connections, maybe 300 symbols per second. As such it needed to minimize the keys needed to accomplish a task and maximize user friendliness within such constraints. Turns out that goal is still very much relevant today - although there is a learning process to learn the code book.

👤 jskulski
Yes. I no longer use vim (plugins aren’t fun to mess around with for me, feel like I’m just always catching up to functionality in more complete tools) but I use vim mode in all my other editors/IDEs (pycharm, emacs, vs code)

For actual, non-semantic text editing, the speed of vim muscle memory can’t be beat.


👤 matt123456789
Vim is a text editor, not an IDE, although there are plugins and scripts you can use which give it IDE features. It useful to write quick Bash and Python scripts without leaving a terminal. For large projects I will usually reach for a workstation with an IDE/browser/GUI file manager/etc.

👤 antonyh
No, just the basics is enough, and has been enough for me for almost 30 years. The move to containerised services has reduced the need to SSH to servers for the most part.

Personally I've enjoyed using Emacs more. With a good setup I have been more productive with that tools than I would have been with Vim.


👤 ggm
Previously I would have said yes but if you aren't destined for systems administration, you can install tools which suit your muscle memory and workload better. VS or atom?

40 year vi and Emacs user btw. I miss classic vi. Nvi isn't quite there and small aspects of Vim grind my gears.


👤 reginol
Yes, but only the minimum necessary to use it reasonably effectively, as a last resort if you end up on a system without any other editors.

Using it as a daily driver is a waste of time when there are much more pleasant editors to do your work in, these days.


👤 stcroixx
I wouldn’t bother. I’ve been using it for 25 years, but only because it’s available everywhere. I would never use it as a code editor. For me it’s a skill to be able to edit files in any unix environment and I leave it at that.

👤 ozim
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.


👤 singularity2001
ESC :x is inevitable to learn.

i and ESC :w should also be in every programmers repertoire.

/ for search 123G for line number x d gg and G are valuable if you use vim a bit

The rest has diminishing returns unless you ssh a lot into machines without GUI.


👤 MrMan
I didn't grow up as a unix user by random chance I worked at windows companies, so I neglected vi and vim. recently I took the vim tutorial and have been Ising neovim and it has changed my life.

👤 VintageCool
If you ssh into servers then I think it is worthwhile to learn some vim.

👤 cutthegrass2
For slicing and dicing text, nothing is faster.

It's a learning curve though. I'm 16 years along the curve and still learning things.


👤 Cloudef
Why vim? Works in terminal and over remote shell, is on 99% of machines, no need to setup and lastly fast.

👤 juancn
Yeah, at least the basics so you can edit files in a terminal over a crappy connection.

👤 camgunz
Yes; 100% yes. I'll make three pitches here:

1. Vim has almost certainly staved off RSI for me. I've probably got > 10k hours physically programming under my belt. From time to time I've felt small pangs, but my worst RSI has been when I was using a mouse. Vim will also let you remap whatever you want, so you can adapt it to whatever your changing physicality is.

(Side note: I know a lot of people talk about their muscle memory, but even I as a person who can't always tell you how to do what they do in Vim have adapted here and there; most recently: Neovim changes what 'Y' does, which is ABOMINABLE DO YOU HEAR ME NEOVIM DEVS I CURSE YOU--but I adapted in like a week)

2. You can adapt Vim to help you think, and get out of you way when you're on a roll. This is more important than you might think. Vim will help you avoid blunders by letting you use whatever combination of linters and checkers you want. Vim will also let you edit code so fluently that it's close to the speed of thought.

3. Vim is open source. Not everyone is as Marxist as I am, so I recognize that this might not resonate with everyone. But as SWEs, SREs, etc., our major community is the open source community. This is our garden, our house. We should be building, using, and improving our own tools. A world in which all our tools are corporate built and owned, and used solely for the purpose of doing their bidding sounds pretty bleak. It sounds like every house is a McMansion leased from Zillow and decorated from AirBnB-approved home furnishing warehouses delivered by Uber Eats. I know that's pretty far down the road from just using VS Code, but when you think about the corporate strategy behind it, what else could it be?


👤 dmarchand90
I would start with the vim keybindgs in vscode. Even from a pure ergonomics point of view

👤 Aachen
> [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/w/e) without needing to reach for control at the edge of your keyboard, jumping to an exact point you need (f/F/t/T) if it has a unique character (like the ')' within 'if (uid == 0)'), moving between paragraphs ({/}), going to matching parens/braces/brackets (%), going to the next/previous word under the cursor (*/#), etc. This is what will make you faster, not the switching from arrows to hjkl.

And that's just cursor moving. For editing, things like S to replace the line or C to replace the rest of the line after the cursor, di) to cut the part within parentheses and p (paste) it elsewhere, repeating the previous action with dot, searching with n/N instead of a function key, all those things are what makes vim nicer as a text editor. One of the least-appreciated things that I also use a lot is filename completion with ctrl+xf (sysadmins, take note!).

But I don't recommend learning everything at once. If you know how to go into insert mode (i), how to leave insert mode (escape), and how to save a file, then you basically have the equivalent of a text editor, especially with mouse mode enabled (the default nowadays, I think). From there, learn one command every week. Takes 1 minute per week and you'll know more vim than 99% of developers within a year.

Or go a bit faster and try to learn one command every morning, or every second day perhaps. 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 ^^'

> mostly using Java IDEs, and lately some vscode (for go, typescript, rust)

Do you need intelligent autocompletion, debugging, and other such IDE features?

There are plugins that, so far as I know, can do a lot of what an IDE can do, but I have never bothered to set them up myself. It all seems hacky and niche, but others can tell you more if this is the type of things you're looking for. I am not a real developer myself but I write a lot of scripts (things small enough to keep a full understanding in my head) as well as documents (reports for pentests) in vim, and for that it is perfect.


👤 throwaway0asd
You can SSH into a remote box and open vim just using your tty.

👤 snarfy
Try running vimtutor.

👤 realharo
What do you expect out of it?

👤 gsirbiladze
YES!

👤 wereallterrrist
You could just use Helix instead. `hx --tutor`. It enables the functionality of a 12-hour tuned Vim, out of the box, except faster and with less crashes / weird plugin interactions.

OP mentions they're open to comments about Helix... but you do you yall. The comment isn't hyperbole, I used vim for 15 years, but again, whatever.