I updated my Android Studio recently (Electric Eel 2022.1.1 Patch 1) and whenever I press:
Command (⌘) + 7 it opens "Structure" window instead of uncommenting/commenting lines of code.
How can I get rid off this keybind for opening "Structure"?
Found solution: Open preferences -> keymap -> search for "structure" and remove the key binding, or add new shortcut cmd for comment line of code.
On linux, i press alt + up or down to shift code up or down on vs code.
how do i do the same on mac?
it's a command Move Line Up/Down.
open show all command with shift+cmd+p
type Preferences: Open keyboard shortcuts
search move line
look what keybinding you have (mine was option + up/down)
I can open R Script with Ctrl + Shift + N. How to use a shortcut to open a rmarkdown file immediately in RStudio?
Is there a solution from the command line?
I use Ubuntu 16.04
I don't know of a true built in shortcut - but you can navigate with alt as alt + F + F + M (in sequence, not at the same time) on Windows RStudio
i'm trying to indent my code in visual studio code. I searched and i found that ctrl + F + K should be work, but it doesn't. I tried cmd + k + f too, but it still not working. I hope you can help me!
The shortcut is: Alt + Shift + F
Updated December 21, 2017: as pointed out by Fabio, on mac it should be: ⌘ + ]
On Windows: indent control is ctrl + ]
A good way to find commands is by navigating to:
Code -> Preferences -> Keyboard Shortcuts
Also, the Visual Studio Code team provided those handy shortcut pdfs:
MacOS
Windows
Linux
Another helpful command to achieve this might be: shift + option + f which is auto format.
The shortcut to format code on Visual Studio for Mac Community Edition is Ctrl + i
(edited on 4th Jan 2023: the answer below still remains the same, in version 1.74.2, Nov 2022)
For visual studio code version 1.36.1 (2019)
To auto-format the selection, use ⌘K ⌘F (the trick is that this is to be done in sequence, ⌘K first, followed by ⌘F).
To just indent (shift right) without auto-formatting, i.e., blindly indent, use ⌘]
As indicated in Visual Studio Code's Keyboard Shortcuts (⌘K ⌘S, or from the menu as shown below)
The shortcut to align code in MAC is : Option/ALT + Shift + F.
Visual Studio for Mac Community Edition v 7.5.4 code format is: ^ I
The shortcut is:
Option Shift F
Mac 16 M1 Pro
cmd + k + f working for me
On Visual Studio for Mac Version 8.7
Select the code and go Edit -> Format -> Format Document
cmd + A + cmd + K + cmd + F
this worked for me.
All I do is to hold "cmd" and then press A, K, and F one by one.
Only Ctrl + I for me worked.
Everything else hasn't worked.
Fix Formatting in Visual Studio for MAC 2019: Control + I
Source here
So I have used Intellij Idea on Ubuntu before and the shortcut for "searching a file with a name in the project directory" used to be
Ctrl + Shift + n
I have tried
command + Shift + n
control + Shift + n
but if just opens a "New scratch" dialog. Does anyone know whats the correct shortcut in the Mac?
The shortcut on OS X is ⌘+Shift+O (at least in the OS X 10.5+ keymap, which should be default).
Or you can use more universal shortcut Shift+Shift (Search everywhere action) which is the same on Windows/OS X/Linux and searches through classes, symbols, files, etc.
Here is also a convenient list of important IntelliJ shortcuts on OS X.
If by some reason the default keymap is changed, there are several ways to see the actual shortcut:
open "Main Menu > Navigate" and see what is the shortcut in frong of "File ..." sub menu;
open "Help > Find Action" and type "navigate file", the shortcut will be displayed in front of the action;
open "File > Settings > Keymap" and search for "navigate file" action, again the shortcut will be displayed in front of the action.