You can delete everything inside the first parentheses on the line by "cib"
The bad part is when you learn vim bindings you want to throw up when you use any other editor.
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.
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
- Yes, Helix is a fully keyboard based editor. It does have some minor mouse support available but it is an afterthought.
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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!"
Helix is really fucking good too, it was really easy to pick up as a VIM user and it's 99% batteries included. You still have to manually install the LSP for most of the languages, but it makes it really easy for you to do so, just run hx --health <language> and if the LSP is not installed it tells you the name and you can just look up how to install that on your system, which is usually just one command.
Also it's written in Rust so added bonus for that 🦀
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.
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.
😭
wait until you try emacs
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”.
On a related note, try Vimium (FF / chrome extension) that brings vim motions into your browser. You will have a more complete experience.
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.
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.
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.
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