4 ms·
Refactoring is where it's at for me. The ability to rename functions and variables across not just a local file, but all references in the code base is huge. R
by mankyd 5y ago
Refactoring is where it's at for me. The ability to rename functions and variables across not just a local file, but all references in the code base is huge.
Relatedly, the ability to find all usages of a symbol and navigate between them is indispensable for me at this point.
- OJFord 5y agoPlenty of LSP clients to choose from for vim.
- lacksconfidence 5y ago> Relatedly, the ability to find all usages of a symbol and navigate between them is indispensable for me at this point. I don't know if people just aren't aware, but vi and emacs have been doing this since at least the 90s. This isn't some fancy feature that requires an IDE. Recently the support has improved even more through LSP.
- jcelerier 5y ago> I don't know if people just aren't aware, but vi and emacs have been doing this since at least the 90s. This isn't some fancy feature that requires an IDE. Recently the support has improved even more through LSP. No, rtags & friends aren't remotely comparable to an IDE which has a semantic understanding of the code, and will catch the uses without false positives.
- lacksconfidence 5y agoI mean, I think they are? Sure jumping to a generic definition like getId will give you more choices, but i know which one i want. Having to push space and then 9 to get the second page and choose the one i want isn't the end of the world. Recently LSP provides exactly what you desire anyways with context sensitive jumps. Edit: Regardless, perhaps our difference here lies around what the minimum specification is. My reading of this thread and the post i responded to is that people think moving around in code without an IDE means closing one file, navigating to the next file and opening that one. This is patently not how it works, and what i was adressing.
- jcelerier 5y ago> I mean, I think they are? Sure jumping to a generic definition like getId will give you more choices, but i know which one i want. Having to push space and then 9 to get the second page and choose the one i want isn't the end of the world. I often do codebase-wide renamings. I would definitely lose a lot of time if I had to check every single instance of "getId" as you say (to give more precise figures, if I want to rename an "id" I get ~2000 matches). With my IDE I can just ctrl-shift-r and rename any symbol and it works without me having to think about it. > Recently LSP provides exactly what you desire anyways with context sensitive jumps. that's likely implementation issues but LSP for C++ in 2021 is definitely not as good & integrated as e.g. native clang integration for parsing.
- OJFord 5y agoLSP gives you exactly the same functionality though, since it's what VS Code is also using. Whether the implementation is prone to false positives (it really shouldn't be) is up the server, not the client (e.g. vim or VS Code). The client actually doesn't have 'a semantic understanding of the code' - that's the point of it, not needing every editor to implement an understanding of every language it wants to support.
- h4x0r12345 5y ago> I don't know if people just aren't aware, but vi and emacs have been doing this since at least the 90s. This isn't some fancy feature that requires an IDE. Recently the support has improved even more through LSP. We know about them. When you start adding these scripts to vi and Emacs they're no longer in the realm of plain text editors. You can add a bunch of hacks to turn vi or Emacs into a poor mans IDE.
- newbie2020 5y agoThis is my favorite IDE feature! I don’t know how text editor folk do this