this post was submitted on 06 Nov 2025
176 points (94.4% liked)

Programming

23517 readers
200 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

I’ve tried vim on and off during college but never really had the time to fully get working with it. As it turns out the stress of two degrees is not conducive to “fun activities”. Now that I have a real job ™️, I’ve decided to finally try and use it this week full stop and I genuinely feel like a programming chad. There’s still a lot I’ll need to learn and probably overtime I’ll discover some inefficiency in how I’m using it now but it really does just feel good. I understand the hype now.

top 50 comments
sorted by: hot top controversial new old
[–] cosmicrose@lemmy.blahaj.zone 54 points 2 weeks ago (3 children)

There are always more cool tricks and great plugins out there, have fun!

Also I’d recommend Neovim, it’s exactly like vim except it supports Lua scripting, so there are lots of powerful plugins that aren’t available on vanilla vim.

[–] onlinepersona@programming.dev 12 points 2 weeks ago (3 children)

Ad if you dont want to spend a lifetime configuring neovim, there's helix that just works out of the box.

[–] malware@lemmy.zip 9 points 2 weeks ago (2 children)

Can helix be fully controlled by keyboard? Does it have a 1-to-1 vim mode? Kind a interested in trying other editors, but I find vim controls are vastly more comfortable to anything that I tried so far

[–] BartyDeCanter@lemmy.sdf.org 11 points 2 weeks ago (1 children)
  1. Yes, Helix is a fully keyboard based editor. It does have some minor mouse support available but it is an afterthought.
  2. Nope! While the key map of Helix is fully configurable and by default similar to vi, it uses a select-verb grammar instead of a verb-select grammar.
[–] malware@lemmy.zip 2 points 1 week ago (1 children)

Nice, solid keyboard controls are a must for me. I'll try it out.

[–] Sxan@piefed.zip 5 points 1 week ago

Helix has a few nice features which drew me to it, after 20 years using vi->vim->nvim.

  • Truly modal. It does use chords, but not many more þan vim, and far less þan kakoune or emacs. Most operations are modal, which is kinder to my RSI
  • Batteries included. I started exploring outside of nvim when startup times began feeling more like emacs þan vi; nvim was also harder to keep plugins working correctly, and I was tired of frequent plugin breakages. Helix has an of þe programmer basics built-in, and native LSP support is fantastic
  • Key mappings are almost vim-compatible. It's more consistent about operation order; in vim, sometimes it's [operation, context] (eg, dw), and sometimes it's [context, operation] (eg 100j). In Helix, it's always [context, operation], so its wd.
  • Helix has robust multiple disjoint selection support (as does kakoune). Once you get used to it, it is hard to do wiþout it.

Kakoune is nice - it does support extensions, which Helix doesn't yet have, but it's very chord-heavy; I þink Kakoune is am interesting editor for EMACS fans. Helix follows vim's modal model more closely

[–] onlinepersona@programming.dev 6 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

I encourage you to read https://docs.helix-editor.com/from-vim.html

I find its model superior to vim making it much easier and intuitive.

load more comments (1 replies)
load more comments (2 replies)
[–] galaxy_nova@lemmy.world 5 points 1 week ago (1 children)

I’ll have to try neovim, and eMacs and all the derivatives. Honestly I just went straight to vim first because I wanted to try to OG experience first to see what it was like. I’ve also simultaneously been using vim mode in Zed which has been pretty nice too.

load more comments (1 replies)
load more comments (1 replies)
[–] Aurenkin@sh.itjust.works 23 points 2 weeks ago (1 children)

I like to say that using Vim turns editing into an optimisation puzzle. That will either sound super fun to you in which case you'll probably love it or it will sound like a nightmare in which case maybe it's not for you.

[–] four@lemmy.zip 15 points 1 week ago

I looove solving the optimization puzzles instead of actually doing my job :D

"Yes boss, I am working on that feature. Right now I am installing a new plugin that will save me 5 seconds and 14 keypresses!"

[–] somegeek@programming.dev 18 points 1 week ago (1 children)

The bad part is when you learn vim bindings you want to throw up when you use any other editor.

load more comments (1 replies)
[–] lobut@lemmy.ca 17 points 2 weeks ago (2 children)

I've always liked vim but one thing that I really loved about it was when I started using vim mode in zsh.

Being able to just navigate through commands in my terminal and easily highlight and edit and all that ... it's so good.

[–] tal@lemmy.today 13 points 2 weeks ago* (last edited 2 weeks ago)

when I started using vim mode in zsh.

I'm an emacs user myself, but if you're not aware, readline


which handles a considerable portion of the "prompt for text" stuff in many terminal programs, like input for bash and such


can be put into vi mode.

https://tiswww.case.edu/php/chet/readline/rluserman.html#Readline-vi-Mode

In order to switch interactively between emacs and vi editing modes, use the command M-C-j (bound to emacs-editing-mode when in vi mode and to vi-editing-mode in emacs mode). The Readline default is emacs mode.

When you enter a line in vi mode, you are already placed in ‘insertion’ mode, as if you had typed an ‘i’. Pressing ESC switches you into ‘command’ mode, where you can edit the text of the line with the standard vi movement keys, move to previous history lines with ‘k’ and subsequent lines with ‘j’, and so forth.

Or, in ~/.inputrc:

set editing-mode vi

To set the default.

[–] bradboimler@lemmy.world 3 points 1 week ago (2 children)

HOLY CRAP

Let's say I run a command that spews output. Are you saying that with Zsh I can use only the keyboard to navigate the spew, copy a bit of it, and paste it in a new command?

If so I should try it out!

load more comments (2 replies)
[–] slowbyrne@lemmy.zip 15 points 1 week ago (1 children)

Modal editors in general are awesome. Currently using Helix as my goto editor

[–] beejjorgensen@lemmy.sdf.org 3 points 1 week ago (2 children)

I was just going to say this. The modal part is the important part. Helix seems great, but I was unable to find a killer feature to draw me away.

[–] BartyDeCanter@lemmy.sdf.org 2 points 1 week ago (1 children)

For me, the killer feature is the consistent selection->action grammar followed by the discoverability features. Being able to see what I am doing before I do it works much better for me and having those little pop ups for the space and g menus mean that I learned the bindings so much faster and use more of them that I ever did for either emacs or vim.

load more comments (1 replies)
load more comments (1 replies)
[–] rozodru@pie.andmc.ca 15 points 1 week ago (9 children)

The thing about Vim is once you get the navigation down you'll want it for everything and you'll refuse to go back to anything else.

I used Vim for so long that I can't live without some form of vim style navigation. my Window Manager uses it, my web browser uses it, all my TUIs use it, hell I even switched to Emacs and installed Doom Emacs and THAT uses it. Now I only ever use a mouse for gaming because you realize that navigating around your PC purely with your keyboard is actually faster than using a mouse. I've disabled the touchpad completely on both my laptops.

If you're digging Vim check out NeoVim with LazyVim. makes plugins and theming and what have you easier. I use it as my backup to DOOM Emacs.

load more comments (9 replies)
[–] mr_satan@lemmy.zip 11 points 1 week ago (9 children)

So I keep trying vim and now neovim, I kind of like it as a good allrounder for one off syntax highlighted editing. It's just that for me, quick and simple editor.

For a true IDE I need proper symbol navigation. What I have in my JetBrains setup: ctrl+click - go to definition, ctrl+shift+click - search for references, alt+ctrl+click - go to implementation, alt+ctrl+shift+click go to declaration (specific to going to an interface). Then there's symbol renaming and good multi carret / selection support with keyboard and mouse bindings (alt+up/down arrows, alt+single/double/tripple click). Also, multicarret copy pasting is a major feature.

Let's not forget about live static analysis and autocomplete with support for fuzzy search and documentation.

I don't even know where to start to make vim or neovim do all that. If it can't do that seamlessly and just as well, vimlike editors will never be a replacement for a proper IDE. It's fast, capable single file and small scope editor for me.


I do also like all the alt and ctrl combinations with arrow keys to move lines, blocks and jump over words.

[–] aesopjah@sh.itjust.works 5 points 1 week ago (2 children)

gd to j(g)ump to definition. Just to say that those features exist in nvim.

[–] absentbird@lemmy.world 3 points 1 week ago

I always thought it was (g)o to (d)efinition.

load more comments (1 replies)
[–] BartyDeCanter@lemmy.sdf.org 3 points 1 week ago (2 children)

Give Helix a try. It comes with everything you are asking for built in, plus discovery for the commands, plus a selection first approach so you can see what you’re doing.

[–] fin@sh.itjust.works 3 points 1 week ago* (last edited 1 week ago)
load more comments (1 replies)
[–] Mikina@programming.dev 3 points 1 week ago* (last edited 1 week ago) (1 children)

I do also like all the alt and ctrl combinations with arrow keys to move lines, blocks and jump over words.

That's what I love the most about VIM, that it has dozen little tricks like these. Need to jump over a word? Jump to next occurance of letter L? Jump five words? Jump to second parameter of a function definition? Jump to matching bracket? There's a motion for all of that, and more. Including "go to definition" or "go to references", if you set up your vim correctly.

I don’t even know where to start to make vim or neovim do all that.

What I did was simply install IdeaVIM into my Rider, so I can start learning the motions while also keep the features of the IDE I'm used to, but also more importantly installed LazyVim, which is a pre-made config for nvim that can do most of that by default, or has a simple addon menu (LazyExtras) that automatically download and install plugins relevant for a language you are working on. I.e I need to work in Zig, I just open LazyExtras menu, find zig-lang, and it install LSP, debugger, linter, etc that's specific for that language.

load more comments (1 replies)

I don’t even know where to start to make vim or neovim do all that. If it can’t do that seamlessly and just as well, vimlike editors will never be a replacement for a proper IDE. It’s fast, capable single file and small scope editor for me.

If you're interested in learning how to do it, I found this guide extremely helpful for getting started. it's in both blog and video format, and it shows how to install Lazy (a package manager for vim), and which plugins to install to get LSP working (which is what would provide all the hotkeys that you were mentioning above).

It's definitely not a task for the faint of heart, but I found it very rewarding once I figured out how to work with the plugin systems because it's so powerful and easy to customize. I found it helpful to just watch the video a few times to see everything working, then slowly started building up my own configuration (which was a bit more minimal than the linked guide I provided - I only installed about 30-40% of the plugins he listed on that page).

Another alternative is Lazyvim, which provides an out-of-the-box configuration experience for you. It installs a lot of plugins and most things should work out of the box with very little configuration. It is a massive beast though, but still pretty good for a first start.

[–] FizzyOrange@programming.dev 2 points 1 week ago (1 children)

I completely agree. Also almost all of the fancy editing you can do with Vim can be done just with multiple cursors, and it's less annoying because you do it incrementally (rather than typing a long sequence of commands and then seeing the result), and you much less to memorise.

load more comments (1 replies)
load more comments (4 replies)
[–] ArseAssassin@sopuli.xyz 10 points 1 week ago (1 children)

I know! The other day I just figured out what :q does, never felt so powerful.

[–] mrh@mander.xyz 9 points 2 weeks ago (3 children)
[–] natecox@programming.dev 6 points 2 weeks ago

I went from vim to Emacs and loved it, right up until I found Helix. My “just trying it out” became “never opened emacs again”.

[–] malware@lemmy.zip 5 points 2 weeks ago (1 children)

Tried emacs after vim and it made my pinkies hurt. If only it was exactly as vim...

[–] badabim@lemmy.world 7 points 2 weeks ago (1 children)

Check out evil to use vim keybindings within emacs. If you want a battery-included experience, try Doom Emacs where enabling evil is a breeze.

load more comments (1 replies)
[–] limerod@reddthat.com 2 points 2 weeks ago (1 children)

Yeah. It was frustrating to use vim. Emacs on the other hand was so much fun. The amount of things you could tweak and change. I haven't seen another software which can do this today.

[–] sping@lemmy.sdf.org 3 points 1 week ago

It really is unique.

[–] chasteinsect@programming.dev 8 points 1 week ago (3 children)

On a related note, try Vimium (FF / chrome extension) that brings vim motions into your browser. You will have a more complete experience.

load more comments (3 replies)
[–] ExLisper@lemmy.curiana.net 6 points 1 week ago* (last edited 1 week ago) (3 children)

Vim is great for editing in general and coding simple things but I kind of gave up on using it as an IDE. Too many plugins to configure, to many breaking changes, too many bugs. My current issue is that after couple hours or days code formatting simply breaks and starts mangling my code. Only full restart fixes the problem. It's impossible to figure out were the issue is as there are so many plugins and external tools involved. I still think it's amazing you can setup vim to work as a full IDE with code completion, refactoring, formatting and all but it's just not stable enough. I reluctantly switched to Zed with vim mode. I miss smooth scrolling but other then that it's really nice.

load more comments (3 replies)
[–] SinTan1729@programming.dev 5 points 2 weeks ago* (last edited 1 week ago)

Welcome to the club. Don't worry too much about setting it up perfectly in your first attempt. You're gonna rewrite your whole config every year-ish anyway. (Or is that just me? 😥) Also, try Neovim. It'll be a drop-in replacement for your current config. But Lua is just a superior language compared to Vimscript, so you'll have a much better performance in the future. You also get all the sweet LSP and treesitter features.

[–] marlowe221@lemmy.world 5 points 1 week ago (1 children)

You probably already know this, but most IDEs have a setting to enable Vim keybinds or you can easily install an extension to add them.

I really like Neovim but my job often requires some stuff that it doesn’t easily do. So, VSCode is what I use a lot of the time… with the Vim extension.

Just something to consider if your stack isn’t super well supported in Vim/Neovim or you need tools it doesn’t have for your work.

[–] msage@programming.dev 8 points 1 week ago (2 children)

I tried vim keybinds in an IDE, and it sucked.

It wasn't even that advanced usage, but it just didn't work.

Instead I know run language servers in neovim.

[–] schnurrito@discuss.tchncs.de 3 points 1 week ago (2 children)

What part didn't work? I use that all the time in IntelliJ and Visual Studio Code.

[–] expr@programming.dev 3 points 1 week ago

Most of vim is not emulated. It's very surface-level and limited. The closest is evil mode for emacs, which is decent, but still lacks a fair bit. The emulators in Intellij and VsCode are paltry in comparison to what vim can do.

load more comments (1 replies)
[–] Markuso213@piefed.social 2 points 1 week ago (1 children)

I agree with you. I figure you probably know this, but VS Code can act as a frontend for Neovim, providing one-to-one Neovim keybindings.

Some parts I never got working, but movement was honestly flawless. But I use a lot of snippets with ultisnips, and I didn't like the idea of translating all of that to hypersnips (or whatever the VS Code equivalent was called), so I stuck with Neovim.

load more comments (1 replies)
[–] paequ2@lemmy.today 2 points 2 weeks ago

Awesome! There's a tooon of stuff to learn, but Vim is eternal, so it'll be a good investment.

load more comments
view more: next ›