8 ms·
All of that can be done in JetBrains' IDEs with a single hotkey. Especially stuff like code extraction or variable/class/function renaming — it actually works r
by 5e92cb50239222b 4y ago
All of that can be done in JetBrains' IDEs with a single hotkey. Especially stuff like code extraction or variable/class/function renaming — it actually works reliably across the whole project (not just a couple of files) even if you have multiple functions with the same name. Extracting code to variables/constants/functions also works reliably (like automatically adding referenced data as function arguments).
- kqr 4y agoYes, but does it work the same way in Shell scripts, Ada, Haskell, Perl, Python, C#, screenwriting, and documentation? The power of text-based manipulation is that you don't have to learn a different set of hotkeys for different types of material.
- probablynish 4y agoIntelliJ (the canonical JetBrains IDE) has plugins for the first 6 of those - so at least for those, it does work the same way. The hotkeys to perform the actions mentioned in the parent comment don't change.
- kqr 4y agoTIL! There weren't so many language plugins last time I tried it, so I felt like I had to drop back into Emacs/Evil fairly often. Good to know that's not as much the case anymore!
- 5e92cb50239222b 4y agoYes, and also in CSS, SQL, ocaml, Rust, and a million other languages. Navigation works reliably (including cross-language navigation: for example, you can easily jump from a CSS class mentioned in HTML or JSX to its definition even if it's has a very generic name and is defined in a random file far away). Even if it has a complicated definition using something like SCSS and is simply not greppable. Or do the reverse — find all usages of a CSS class from its definition (again: do so reliably, it's not a simple grep). Find all references to a particular database column (in SQL queries across the project, foreign keys in other database tables, and ORM models)? Same hotkey. Stuff like code selection works reliably since IDE work with code on an AST level and you're asking it to select the current AST node (and not the "current text block"), going up the tree as needed. And so on.
- p-e-w 4y ago> The power of text-based manipulation is that you don't have to learn a different set of hotkeys for different types of material. And the weakness of text-based manipulation is that it views code as characters rather than as semantic data. Modern IDEs either have their own semantic code operations, or use language servers to actually understand the code rather than just work with character strings. This is vastly more reliable when doing refactoring or project-wide navigation. Text-based approaches are a crude hack by comparison.
- l3uwin 4y ago[dead]
- probablynish 4y agoWould you say that a vim plugin in your IDE of choice gives you the best of both worlds? The superior semantic manipulation of an IDE and the superior text manipulation of vim.
- rhaway84773 4y agoIDEs are incredibly slow. Even the fastest IDEs.
- fileeditview 4y agoIn Vim you also have plugins that provide you with semantic editing (e.g. via LSPs). You then have it both.. same as if you installed a Vim plugin in your IDE. The only difference being that the IDE is slow and has a multitude of features that I don't need whereas Vim is configured to exactly my needs and has instant response always.
- techwizrd 4y agoI tend to use Vim/NeoVim regularly, and I really enjoy using IdeaVim when I use JetBrains' products. I get the fast modal editing and the IDE refactoring features. It's the best of both worlds.