Live data from Hacker News

My Favorite Shortcuts for JetBrains' IDEs

markusdosch.com

41–50 of 71 posts

Re: My Favorite Shortcuts for JetBrains' IDEs

#42

A couple of "problems" I've had with Jetbrains' (more specifically IntelliJ IDEA's) shortcuts are: - Not everybody uses a "standard" set of shortcuts (understandable); so whenever I need to do something on another's system, unless they're on "IntelliJ IDEA Classic" keymap, I'm clueless for a while. - Not wanting to re-learn the "default" (shipped with) "macOS" keymap in case they change it again because of clashes wi…

Personally I just use Shift-Shift for practically everything. Saves me learning someone else's keymap or dealing with platform-specific bindings, and there are quite a few useful commands that aren't bound to keys anyway.

Re: My Favorite Shortcuts for JetBrains' IDEs

#43
I use the vim plugin and various jetbrains commands in IntelliJ.

Multi-cursor select is taken care of by vim's visual block. Basic editing/macros/navigation within a single file also done with vim.

For more IDE/multi-file specific tasks I use IntelliJ's shortcuts:

* cmd+shift+f for global search

* 2xshift for symbol search

* cmd+b to jump to method declaration

* cmd+shift+left/right is also useful to jump to previously navigated cursors

refactoring:

* cmd+alt+v/c/m for extracting variable/constants/methods (good for refactoring after prototyping)

* shift+f6 for renaming variables

* alt+enter for suggestions

EDIT: formatting

Re: My Favorite Shortcuts for JetBrains' IDEs

#44
I've asked this before in other conversations but, what makes VS Code so popular compared to more mature IDEs with a more full fledged set of features like IntelliJ?

I have tried VS Code and the minute I couldn't ctrl + click navigate the code or get contextual ctrl + space bar method or input parameter suggestions I abandoned it.

Re: My Favorite Shortcuts for JetBrains' IDEs

#45
post #21
post #6

Ctrl-alt-L (cmd-alt-L) is my all-time favorite. It reformats the code consistently. It's the first thing I do when I start work on a new codebase, and the last thing I do before a commit. No need for endless discussions on which style is best, as the IDE allows you to set the preferences on a per-project basis. It can also read editor config dotfiles so you can use code formatting consistently throughout a team.

A potential next step if it fits your workflow is to create a macro triggered by save. I have one that optimizes imports, reformats code and do silent code cleanup.

IntelliJ IDEA's commit dialog already offers checkboxes to "optimize imports" and "reformat code" ("run gofmt" in case of Go), among others.

Re: My Favorite Shortcuts for JetBrains' IDEs

#46
post #6

Ctrl-alt-L (cmd-alt-L) is my all-time favorite. It reformats the code consistently. It's the first thing I do when I start work on a new codebase, and the last thing I do before a commit. No need for endless discussions on which style is best, as the IDE allows you to set the preferences on a per-project basis. It can also read editor config dotfiles so you can use code formatting consistently throughout a team.

I'm a JS dev, and Webstorm integrates perfectly with ESLint and Prettier. it takes like two clocks to set up a file watcher on a project and never have to worry about formatting your code again

Re: My Favorite Shortcuts for JetBrains' IDEs

#47
post #2

One of my favorites, which I didn't think to look for for years, is 'Ctrl + Shift + Enter'. This completes your statement for you. Very convenient and lots of wasted punctuation characters skipped.

My favorite too. I always remap that to shift+enter though.

Re: My Favorite Shortcuts for JetBrains' IDEs

#48
You forgot a huge timesaver. I can't remember the shortcut (maybe Ctrl+F6) change method signature.

You can add a parameter and specify a default value that will be added to every call site. You can also reorder parameters or delete one and all the call sites will be updated.

Re: My Favorite Shortcuts for JetBrains' IDEs

#49

A couple of "problems" I've had with Jetbrains' (more specifically IntelliJ IDEA's) shortcuts are: - Not everybody uses a "standard" set of shortcuts (understandable); so whenever I need to do something on another's system, unless they're on "IntelliJ IDEA Classic" keymap, I'm clueless for a while. - Not wanting to re-learn the "default" (shipped with) "macOS" keymap in case they change it again because of clashes wi…

I've switched so many times between my own machines and using others' (on both Mac and Windows) that I can tolerate most of the standard keymaps. I just keep banging until stuff starts to click and my brain can slowly switch over.

Re: My Favorite Shortcuts for JetBrains' IDEs

#50

While we talk about JetBrains, I think they really should push some priority on their remote development support. Take the VS Code Remote SSH extension as a good example of how it could work, which is extremely seamlessly, and it just works. E.g. even the embedded terminal provides a shell on the remote host, and if you e.g. open a file in there via `code somefile.txt`, it will open in your VS Code. It's basically th…

Agreed, SSH-based remote development could certainly be smoother. But I love the way PyCharm uses pydev to run a Remote Debugging Server - that works for most remote-development use cases I encounter. Once you get it set up and a run configuration working, it’s a joy.
Post reply on HN