Ask HN: What are your IDE superpowers? Tips that make you a better developer?
Knowing your IDE well can give you superpowers.
What are some of the ways you use your IDE that boost your effectiveness as a developer?
Do you have any tricks and tips to share?
53 comments
[ 2.0 ms ] story [ 53.5 ms ] thread`:q!` to quit without saving
Another great one: Fuzzy finders for files and even code symbols.
A variation (swapping make for ninja/samu)
Turns out I was much more productive when I switched to mixing in a lot of CLI after I trialled VSCode.
Now, I think I would rather have a mix of a less capable IDE (i.e. a glorified editor) and rely more on CLI where it's appropriate. It's a more flexible approach and you get to understand what is going on under the hood, which means you have a better shot at scripting the more complicated bits of your build process.
I find di/yi (delete/yank inside) to be one of the most powerful.
Every time I am too lazy to cut or awk for a one-time bash script, I just use vim's visual mode.
Need a quick list of things to do or write a bash script to get shit done? "ls -l | vim -" is your friend.
Need to be more efficient in processing git bisects, patches or merges? Use a git alias for vimdiff.
Another fun one is “:%! command”, which pipes the current content to command, and replaces it with the output. (E.g. “:%!jq ‘.’” - to pretty print json). Pretty useful to quickly iterate when building a complicated command with multiple pipes.
Also find paste, and cut commands very useful with tabular outputs.
https://lnav.org/
The most valuable tip for any IDE is to thoroughly learn source code navigation. For example putting the cursor on a function and hitting control B (I think, it's programming into my finger memory so I don't know that actual keys) jumps to function declaration - much easier than searching for function definitions. https://www.jetbrains.com/help/pycharm/navigating-through-th...
There's alot of value in learning how to move functions and methods via the refactoring tools. Someone else in this thread mentioned the value of learning the refactoring tools.
In Pycharm, go to the trouble to make sure the IDE has the correct Python interpreter and environment configured. Pycharm has good tools for managing venv's too - worth learning.
In Pycharm/Jetbrains IDE's the database tools are extremely good - worth learning.
In general it's worth spending several hours watching YouTube videos on whatever your favorite IDE is.
Another super valuable tip is this - if you send alot of time programming, it's easily worth it to spend hard cash on a top class IDE. Of course there's lots of great free IDE's - depends on your preferences - but for me spending a few hundred $ on Jetbrains is nothing compared to the productivity value I get out of it.
This feature has saved me a lot of time for some IDE features I don't use often enough to have memorized a keyboard shortcut. It's the same overlay that appears if you hit CTRL-N (CMD-N on macOS) to search for classes/structs project wide.
2. Double shift for Search all (actions, classes, functions, etc)
3. Learn a bit of regex for more complex file searches
4. Actually learn the debugger features beyond just breakpoint
Also +1 for refactoring tools, that's one of my next ide learning adventures
If your IDE can't do that or gets in the way of the quickly part, replace said IDE. Ideally the program is written in elisp but substitutes are available.
And shortcuts like:
- shift shift - search everywhere
- alt + left / right - go back / forward
- alt + shift + r - refactor / rename
- alt + y / alt + shift y - (un)mark next occurrence (multicursor editing)
- alt + up / down - move current line
- alt + shift + x - run / run test
- alt + shift + d - debug / debug test
- ctrl/cmd + shift + up / down - extend current marked text
alt+shift+arrow to duplicate a line or block of text above or below
alt+ctrl+arrow for multi-cursor
ctrl+d for select next instance of a word
I have these baked into my muscle memory such that I had to physically type them it to remember what key combos they were! I feel completely naked without these combos in other editors.
middle mouse button also for multi-cursor. good for getting to the ends of lines with different lengths, then ctrl+arrow back through them
use a ton of tmux splits
zoom or break-pane to manage info overload
ripgrep/fd to find info fast
vim splits
vim macros can be useful but sometimes I get them wrong on my first try so it’s a tossup as to whether they’re always the choice over . (repeat)
vim bindings in everything that supports it
the key thing for writing software fast is getting guidance and feedback from your tooling without it distracting you or you having to choose to make it apparent; so a good type checker, good linter, good randomized unit tests, and a good Jupyter + Vim window split are killer
I use `vert term` in vim to have side by side shell and editor within vim
I stay out of GUI windows when coding because I find them distracting, and its just too easy to switch to Slack which is just about the most focus destroying app in existence
* alarm code
auto hide terminal,cmd + J to open it
auto hide side bar (which is on the right), cmd + B to open it
turn off tabs, cmd + P to find files
You can time-travel any folder or file in a project to the way it looked each time it was saved/changed and pick changes or whole files out from the historical entries.
Right-click on a file or folder in the project explorer and choose Local History->Show History. I have been shocked when other devs didn't know about it, so maybe this will help someone.
Second small keyboard to single press buttons for macros instead of killing my hands with weird key combos.
Multiple cursors, fuzzy search, local (not git) history, find next occurrence keybind, go to start/end of method, go to next/prev compilation error keybind, scratch files, not having the IDE lock up for no reason, JS + type hints is extremely productive and flexible in webstorm, built in web server for test HTML files...
Second small keyboard to single press buttons for macros instead of killing my hands with weird key combos.
Multiple cursors, fuzzy search, local (not git) history, find next occurrence keybind, go to start/end of method, go to next/prev compilation error keybind, scratch files, not having the IDE lock up for no reason, JS + type hints is extremely productive and flexible in webstorm, built in web server for test HTML files...
I also like to bind the prev/next error navigation to the up/down buttons on my mouse. This makes code navigation and refactoring a breeze.
Macros for starting/stopping services or running a debugger etc.
You can also use it in other places and the IDE can evolve the selections smartly based on ASTs.