Worth learning vim/emacs?

haakon@lemmy.fmhy.ml to Programming@beehaw.org – 1 points –

Im considering spending some serious time learning one of the above. Two principle engineers I work with exclusively use them, and watching them work is incredible, the speed they move and get things done is pure wizadry. Can anyone learn this skill? For what it's worth, the alternative is learning VScode. I’ve exclusive used Android Studio in my career.

15

Learn vim and use it in vscode, kinda gives you the best of both worlds

Definitely. vim is hard to get used to, but after you do, it's damn powerful especially with plugins. Always nice to be able to do typing and coding entirely on the keyboard and not needing to move your hands to the mouse for something. Also, if you do any Linux cli stuff, you almost always have access to vi at LEAST. So being familiar with the tool she the gui and something like nano isn't available, is invaluable.

:wq

You should learn basics of Vim just for quickly editing config files on servers.

For programming I don't think the speed gains are worth it. It would take more time to learn it than I would shave while using it.

Same - I regularly use vim on servers when I have to, but I can only remember some super basic commands. Most of my coding is done in a basic text editor like Sublime Text or Notepad++ or an IDE.

I do get the appeal of becoming fluent in Vim or emacs and theoretically attaining giant productivity gains. Although for me at least, text editing is not where all my time is wasted. I lose my productivity the old fashioned way: attending unnecessary meetings and wasting time solving the wrong problems.

I may be the odd one out here, but I don't think that the editor you use is really going to make all that much of a difference for your efficiency. Text manipulation is rarely your bottleneck when coding, so I'd just go with an IDE / editor you feel comfortable with.

I used to be a hardcore vim user but nowadays I just use VSCode with a heavily customized keymap.

Yes, for me the happy medium is to learn and use Vim emulation within your IDE of choice. Purists will object that Vim emulators offer inconsistent levels of support, but in my experience they all offer support for the core functionality plus varying extras. For those who already have Vim fully configured for their workflow and preferences, there is no substitute. But for anyone else, Vim emulation in an IDE is a great way to level up your text editing powers.

vim keybindings are an amazing and useful skillset to have.

And neovim is the best editor in existence.

Let the religious wars commence!

I would recommend trying a vim extension for vscode first if thats what you're used to already. The learning curve can feel a bit daunting but once you learn some of the really basic shortcuts you will have already noticeably increased your efficiency imo

I think it's worth it mostly because it's really not hard to get to a point where you're equally as efficient as you were before, and from there the sky's the limit.

It's also really nice not to have to open a full gui to make quick edits to files.

For me though, it's not even the efficiency which brought me to it, it's that it just feels so much nicer to use. Someone once told me it's like using a really nice pen: it's not going to make you a better writer but it will make writing a hell of a lot more enjoyable.

I think anyone who does programming should at least give Neovim a good shot. Like, dedicate a few months to get a feel for the basic controls, use relative line numbers to jump to lines, f and F to jump to spots in lines, ciw ci" etc. to change stuff. If it's not your thing then fine, but learning Neovim is like switching from clicking file -> save to ctrl+s, but with everything.

You really don't need a mouse at all and in the end you'll get to make changes as fast as you can think. It's a language you speak through your keyboard to your editor and things just happen once you get fluent. E: checking if editing helps this thread federate better.

This thread stopped federating for some reason so I'll reply to myself:

How different is neo vim from regular vim?

Functionally it's pretty much identical. For the user the difference is in the added features and development model. Neovim's development model is not centralized to one person and makes real progress. Vim on the other hand is much more a pet project of its creator and seems to get new features only if it starts losing users over to Neovim. Using Vim you're always going to be behind the curve and under the whims of Bram's decisions. Neovim integrated Lua as a first-class language for configuration and it was then that Bram had to do something about vimscript, but opted instead to create a new, backwards incompatible version of vimscript, another bespoke language. I very much advocate making Neovim the norm instead.

Vim is great because you can enable the bindings in nearly every editor.

And then painfully learn which subset of the bindings each editor supports :(