Live data from Hacker News

My Favorite Shortcuts for JetBrains' IDEs

markusdosch.com

11–20 of 71 posts

Re: My Favorite Shortcuts for JetBrains' IDEs

#11
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.

Thank you! I've been using Resharper and IntelliJ (Rider, etc) forever and I somehow I managed to miss that shortcut.

Re: My Favorite Shortcuts for JetBrains' IDEs

#12
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.

+1 on this one.

And yes, there is no such thing as best style, so at the end of the day it boils down to personal preference. I find myself using the ctrl+alt+l often but before i commit any code i carefully go over everything and change it to my particular liking(which is often close enough to what the IDE has done so I rarely spend more than a minute or two on it). Also the reason why I haven't bothered to dig deep into the preferences.

Re: My Favorite Shortcuts for JetBrains' IDEs

#15
I think WebStorm has the problem that the keyboard shortcuts are more or less meaningless key-combinations, it's difficult to remember them unless you use them frequently.

Luckily you can reassign the functions to different keys. For instance I have re-assigned "Show Breakpoints" to Ctrl-Break. Easy to remember right?

I re-assigned Ctrl-I to also Ctrl-E. Why? Because that Evaluates Expressions.

I've been using WebStorm for years now and I still discover useful stuff and keyboard shortcuts in it. That is both great but also a sign of how it is not completely obvious how to do things.

Recently I discovered what I think is the greatest shortcut of them all: Ctrl-Tab.

That pops up a widget from which I can choose which tool-window to make current. Keep the Ctrl down and you can use Tab or arrow-keys to navigate to the tool-window-name you want to activate.

Re: My Favorite Shortcuts for JetBrains' IDEs

#16
post #7

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…

FWIW: In the 2020.1 updates that have been rolled out in the last week the SSH support is now much better. But serious question though: what workflow do you have that remote code editing is necessary?

Not the parent, but I do all my development with VS Code's remote editing. I generally don't run anything on my main desktop. Instead, I have a local VM server that runs a dedicated VM for each of my projects. Dedicated VMs are great because I never run into a situation where project A relies on node.js version X and starts clashing with project B that relies on node.js version Y. And I just manage everything with Ansible so it's easy to blow away a VM and rebuild it if I ever need to.

I wrote a bit more about my setup here: https://mtlynch.io/building-a-vm-homelab/

Re: My Favorite Shortcuts for JetBrains' IDEs

#18
The JetBrains IDEs implement their own raw keyboard event handling, which means that if you have your system set up with a non-standard keyboard layout and JetBrains hasn't implemented their own support, it just won't work.

The issue on their public issue tracker has been open for something like 8 years.

Unfortunately for me this means that no keyboard shortcuts using the Cmd key work, despite me using a built-in macOS keyboard layout with no special customisation.

Re: My Favorite Shortcuts for JetBrains' IDEs

#20
post #7

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…

FWIW: In the 2020.1 updates that have been rolled out in the last week the SSH support is now much better. But serious question though: what workflow do you have that remote code editing is necessary?

I find remote code editing to be useful when I don't have the necessary resources on my machine such as disk/memory/gpu and I am still prototyping a solution, which happens a lot in ML/DL.

I agree that remote code editing is not strictly necessary since you can perform such task with sshfs or git push/pull workflows.

On the other hand, having the remote environment in your local IDE quickens the development and you don't have to setup a full replica of your environment locally.

edit: ML/DL here stands for Machine Learning/Deep Learning

Post reply on HN