The bad part is when you learn vim bindings you want to throw up when you use any other editor.
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.
I tried nvim with all the bells and whistles and it’s just too fiddly
Moved to helix instead, it does the light editing I need with LSP support and themes
I tried helix and it's nice but it's still not ready to be an IDE. Too many features missing. And I'm not learning completely new tool just to edit text. Vim is still great for that. Let's hope it grows and gets all the features eventually.
Yea its definitely not an IDE
I use it mostly when I need to edit a config file quickly and don’t want to bother with a full IDE or VS Code
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.
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.
Do you use vim motions in your JetBrains IDE? We use Webstorm at work and I installed the vim motions plugin because I want to get more fluent with using Vim but I haven't really given it a fair shot yet.
Not really, someone suggested a plugin for that that I will try.
gd to j(g)ump to definition.
Just to say that those features exist in nvim.
I always thought it was (g)o to (d)efinition.
I understand that they exist, the problem is they aren't naturally discoverable. With normal IDEs and context menus, I see keyboard shortcuts as I look for functionality. Neovim doesn't have that. Having to read docs or google for every little action I want to do is very unproductive and annoying. Features need to be discoverable through usage.
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.
I've seen it mentioned and it had already caught my interest. Main drawback I saw was lack of plugin support. It's healthy for an editor to support plugins.
I'll probably try it, since I'm setting up another computer.
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.
Well, having vim in an IDE might be good way to get the hang of it. I do see the potential of vim, but skill floor is too high for comfort. I don't mind learning something, but I need to be productive out of the box.
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.
Ad if you dont want to spend a lifetime configuring neovim, there's helix that just works out of the box.
Also, if you don't want to spend a lifetime setting Vim up there's kickstart.
Modal editors in general are awesome. Currently using Helix as my goto editor
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.
I'm more interested in how do you navigate system menus and such, or does DE manage this? I've tried one Linux distro recently without a mouse attached and it was painful because some elements of the system UI are not accessible in any way
never really an issue with that either because most GUI menus will trigger via alt. even in something like KDE with the proper keybindings setup it's not an issue. heck even discord now has keyboard navigation.
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.
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!"
I know! The other day I just figured out what :q does, never felt so powerful.
:q this

I wonder if iOS and watchOS being macOS in miniature means that the terminal can be used on them natively, like on Android.
😭
On a related note, try Vimium (FF / chrome extension) that brings vim motions into your browser. You will have a more complete experience.
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.
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.
Programming
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