One thing I haven't seen mentioned is that not moving between mouse and keyboard so much reduces the risk of getting an RSI. So even if it didn't make you faster it would still probably be worth it to find a keyboard based workflow.
I use Helix and would suggest you try it (at least to start off with) as it is easier to learn than vim and does not require plugins or a complex config. To answer your question I will go from the less to more advanced/complex:
- Move a line to a new position in the file/another file (takes a couple of seconds)
xthendto select a line (pressing N times will select N lines) and delete it (delete will also copy to the clipboard)- navigate the cursor to the new location
pto paste in a new
- Navigating around a file:
- jumping to a function/class definition by pressing
gthendwhen on a function/class usage. - getting a list and navigating to class/function calls when the cursor is on a class/function definition by pressing
gthenr.
- jumping to a function/class definition by pressing
- Multi cursor editing - I use this to make edits to multiple places at once. I most recently used this to extract the names of 30 tables that are used in a SQL file. This probably took ~5 seconds and I barely thought about it. To do this I used:
%to select the entire files contentssto search- typed "FROM "
- pressed enter to create cursor at all locations matching the search
vthengthenlto select the rest of the linespace+yto copy to the system clipboard.- paste into a document where I needed to list the tables
- Using a terminal workspace manager (zellij) with helix and a git tui app (gitui) so that I can easily make code changes, commit, push, ,run tests, move to a new repo and more without leaving the keyboard.
There is actually a helix community on programming.dev: helix@programming.dev