Created
October 13, 2024 14:56
-
-
Save dkandalov/af1fbd110cb4ebcc8b4236df82079f89 to your computer and use it in GitHub Desktop.
intellij-guide-socrates-be.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The Ultimate Guide to IntelliJ | |
#### tippy tappy | |
--- | |
## https://gitlab.com/enverbral/socrates-hearts | |
--- | |
## Overall ideas | |
- Learn one thing at a time (or whatever works for **you**!) | |
- [Slowification](https://www.amazon.com/Wiring-Winning-Organization-Slowification-Simplification/dp/1950508420) | |
- Half of this applies to other editors (try [Zed](https://zed.dev/)? :)) | |
- Don't stick to the default shortcuts | |
- Explore Main menu | |
- Help - My Productivity | |
- `cmd/ctrl+shift+A` to find actions; `alt+enter` to assign shortcuts | |
--- | |
### Plugins I use | |
- [https://github.com/dkandalov/ijkl-shortcuts-plugin]() | |
- [https://github.com/dkandalov/quick-fix]() | |
--- | |
## Loops | |
#### (as a metaphor for what we do) | |
--- | |
### Delivery loop | |
- coding 👈 | |
- build/deploy | |
- observe | |
--- | |
### Other (background) loops | |
- sleep, hunger | |
- feelings | |
- self-narrative | |
- etc... | |
--- | |
### Coding loop | |
- browse | |
- edit code | |
- test/run app | |
- commit/push | |
--- | |
## Browsing mode 🌐 | |
#### (ok to use mouse) | |
--- | |
## Navigation within editor | |
- up/down | |
- move to word edges by default | |
- avoid keyboard arrows (?) | |
- file structure (cmd+F12) with speed search | |
- collapse/expand (making navigation easier); cmd+. to fold anything | |
- by doing text search (F3) or Next Occurrence of the Word at Caret (cmd+F3) | |
- highlight usages in the file, then F3 | |
- next/previous warning or error (F2, shift+F2) | |
- back/forward (ctrl+alt+left/right, alt+(shift)+b | |
- go to line | |
- scroll to center | |
--- | |
## Navigation between files | |
- go to definition (F4) or "go to declaration or usage" or cmd+click (and then back; equivalent to quick definition on cmd+shift+I) | |
- find usages (in a popup window) on cmd+click | |
- go to implementation (ctrl+alt+click, ctrl+alt+B), go to super method | |
- prev/next tab (if you use tabs) | |
- switcher (ctrl+tab) for active tabs or recent files (cmd+E); note that you can "delete" in the popup | |
- select in project view (alt+F1, 1) | |
"jump to navigation bar" action | |
--- | |
## Tool windows | |
- shortcuts to (de)activate tool windows (the defaults are not great) | |
- there is "Tool Windows" popup which can be assigned a shortcut | |
- "Hide/Restore Tool Windows" action (cmd+shift+F12 by default but maybe just F12 is better) | |
- speed search by just typing (also works in most popups) | |
- left/right tab | |
- resize alt+cmd+shift+left/right/up/down | |
--- | |
## Staying focused | |
- set shortcut for closing notifications: Main Menu - Windows - Notifications - Close First | |
- set shortcut for "Show Context Menu" (aka right click menu) | |
- set shortcut for "Active Editor: Soft-Wrap" | |
- highlight only current declaration (only available in internal mode) | |
- disable inspections till next commit | |
- distraction free mode is still distracting | |
- collapse/expand | |
--- | |
## Version control | |
- show history for selection/file/folder | |
- ... | |
--- | |
## Overall browsing ideas | |
- building composable set of actions over learning all possible shortcuts | |
(e.g. instead of "add to vcs" action, vcs popup menu + add to vcs from the menu) | |
- browser as a metaphor | |
--- | |
## Editing mode ⌨️ | |
--- | |
## Text edit | |
- type, undo/redo (cmd+Z, cmd+shift+Z) | |
- start new line (enter or shift+enter) | |
- join line (ctrl+shift+J) | |
- duplicate line (cmd+D) | |
- delete line (cmd+Y) | |
- copy/cut line | |
- copy-paste history (cmd+shift+V; multi-paste) | |
- multi-cursor edit | |
- selection: words, lines, expand/shrink | |
- compare with clipboard and apply the diff (?) | |
- avoid keyboard arrows (?) | |
--- | |
## Code within function/method | |
- completion | |
- alt+/ | |
- . and wait | |
- ctrl+space (basic), ctrl+shift+space (type matching) | |
- chatbot "Call Inline Completion" | |
- tab/enter to complete (?) | |
- start with expression, then introduce local var | |
- introduce local var vs inline | |
- intentions (explore them on alt+enter) | |
- move statement up/down (ctrl+shift+alt+up/down) | |
- unwrap surrounding if/while/lambda | |
--- | |
## Run | |
- compile (cmd+F9) | |
- run tests/app (alt+shift+F10/F9, shift to switch; code coverage, profile) | |
- compare with clipboard action | |
--- | |
## VCS | |
- "Show Diff for Line" action to show diff for VCS | |
- Shelve/unshelve | |
- Commit | |
- group by directory/module | |
- partial commits | |
- ctrl+M to see message history | |
- edit commit message | |
- squash commits | |
--- | |
## Overall editing ideas | |
- don't type any code unless you have to | |
- rely on intentions/intentions | |
- expand/contract to add code | |
- limited red (except for targeted add function/parameter) | |
because it's a better workflow and IDE will work better when everything is compilable | |
--- | |
## Overall ideas (again) | |
- Learn one thing at a time (or whatever works for **you**!) | |
- [Slowification](https://www.amazon.com/Wiring-Winning-Organization-Slowification-Simplification/dp/1950508420) | |
- Half of this applies to other editors (try [Zed](https://zed.dev/)? :)) | |
- Don't stick to the default shortcuts | |
- Explore Main menu | |
- Help - My Productivity | |
- `cmd/ctrl+shift+A` to find actions; `alt+enter` to assign shortcuts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment