News for hackers. Stuff that matters.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by user3939382 on Wednesday March 20, 2024 @08:11AM (#39765369)
This would be fun to play with. There’s a vim plugin for JetBrains but I’ve failed to adopt it after multiple separate attempts because each time I run into collisions with my existing workflow shortcuts which I don’t have the patience to remap mentally and in the config.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by 0JzW on Wednesday March 20, 2024 @08:27AM (#39765485)
i use the vim plugin for intellij as well and the first time you press an IDE shortcut that happens to be a vim shortcut also, there's a tiny popup that asks you what you want to do: either keep the IDE shortcut or switch to the vim shortcut. maybe this helps!
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by mablopoule on Wednesday March 20, 2024 @10:23AM (#39767005)
Another trick I use frequently is to map a shortcut to activate/deactivate the vim plugin on the fly, which allows me to keep using some non-vim shortcut and behavior (especially search or selection) without having to go deep into configuring some vim files.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by scns on Wednesday March 20, 2024 @09:31AM (#39766212)
You can set them in an .ideavimrc, then you don't have to go through it on a new machine.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by Dayshine on Wednesday March 20, 2024 @05:01PM (#39771988)
Set all conflicting shortcuts to prefer ide, then set them up again using nonconflicting leader keys.

Are there particularly many vim shortcuts that use ctrl that are important?

Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by LelouBil on Wednesday March 20, 2024 @10:27AM (#39767065)
Speaking about shortcuts in Jetbrains IDEs, I really like the CTRL-w, which selects incrementally bigger chunks of texts (word, quoted chunk, expressions, function calls, blocks).

I like it so much that I always try to do it in other applications, like web browsers.

But in web browsers CTRL-w closes the current tab....

Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by rob74 on Wednesday March 20, 2024 @10:39AM (#39767251)
Not only in web browsers unfortunately, also in Sublime Text...

My favorite (that I wish more editors supported) is ctrl+D for duplicating the current selection (or the current line if nothing is selected).

Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by genter on Wednesday March 20, 2024 @10:49AM (#39767407)
I just tried it in Rider, it closes the current tab.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by _boffin_ on Wednesday March 20, 2024 @11:11AM (#39767740)
Love that little “additional” feature of closing the tab too.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by garblegarble on Wednesday March 20, 2024 @04:47PM (#39771820)
It's called "Extend selection" if you want to use it in Find Actions to figure out what it's bound to on your OS (e.g. on my intellij idea macOS bindings, looks like it's option+up)
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by _JamesA_ on Wednesday March 20, 2024 @10:59AM (#39767569)
Is there an advantage to multi carat support over vim substitution that I am missing? It seems like a solution in search of a problem.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by vladvasiliu on Wednesday March 20, 2024 @11:21AM (#39767867)
It's what I'm wondering, too. Especially since refactoring support in IntelliJ IDE seems quite powerful, even for languages like Python that use a ton of strings.
Re:Show HN JetMove – Extra Nav and Multiple Caret Enhancemen... by chadcmulligan on Wednesday March 20, 2024 @08:04PM (#39773511)
I was thinking the same, is it if you want to replace multiple selections that have different content with the same replacement content. If so, it's not something I can think of ever doing, and in the few cases that I may want to, just do multiple search and replaces, or is there another use case?