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?
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.
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.
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.
Another great one: Fuzzy finders for files and even code symbols.
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
I find di/yi (delete/yank inside) to be one of the most powerful.
ls | entr make
Or any variation thereof. I.e. auto compile and run on file changesA variation (swapping make for ninja/samu)
find . -maxdepth 1 | entr sh -c "samu || lldb -c /tmp/core -b -o bt -o q"
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.
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
You can also use it in other places and the IDE can evolve the selections smartly based on ASTs.
and as a more general tip, that came as a result of coordinating between multiple dev/test/prod machines: use different workspace colour themes to quickly know where you are, and maybe change the default to something terrible.
my main dev machines stay nice and comfy to look at, test isnt too bad either but a very different colour. but prod uses my new default, a horrible bright red, making it impossible to forget im not in a designated safe space
`:q!` to quit without saving
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 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
#!/bin/bash
#./alarm.sh
to_seconds=$(( $1\*60 ))
message=$2
sleep $to_seconds
while :
do
afplay /System/Library/Sounds/Funk.aiff; say "MEETING"; echo $2
done
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.
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...
Just started to use the Deployment feature to do 'local' dev on a VM with rsync-copy-on-file-change.
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
As I switch from running backend to frontend to npm start, I use Ctrl+Opt+D and R to pick which run configuration to launch.
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.
I hate myself.
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