I would like to centre my code in the Android Studio's/IntelliJ's editor, like as it is done in the Distraction Free Mode.
Right now, it is always aligned on the left side of the editor, but I want to have it in the centre of the window. I could not find any option for this in the settings. Is this possible without entering the Distraction Free Mode?
Add -Deditor.distraction.free.mode=true in Help | Edit Custom VM Options and restart the IDE. This will center the editor without the other features of the distraction free mode (like hidden tool windows).
You can also activate this option through the registry:
Type shift shift to search everywhere
Type registry and select "Registry..."
Type distraction to filter the list
Check the box for "editor.distraction.free.mode"
Close the registry
Voilà, no restart needed.
Related
In Android Studio, pressing the up an down arrows will change the contrast of the autopopup bar.
Before
After
This also occurs in the default themes. Is there anyway to make the contrast start in the after position, even without pressing any arrows?
The popup is dimmed to indicate that there is no default selection for completion. It depends on context and in some cases the first entry will be selected automatically, while in the other cases you need to select the completion varian with the arrow keys first.
To get the pre-selection work automatically in IntelliJ IDEA and Android Studio enable the Insert selected suggestion by pressing space, dot, or other context-dependent keys option:
In some other cases it may be also necessary to add
-Dide.completion.lookup.element.preselect.depends.on.context=false
in Help | Edit Custom VM Options and restart the IDE.
Related issue: https://youtrack.jetbrains.com/issue/IDEA-193090.
I really want to use the vim plugin but before I install it I just want to know how easy it is to toggle it on/off?
Does it mess up any of the key bindings or when I toggle it on/off it will revert things nicely without issue?
It's very easy to toggle the Vim plugin on or off. There will be an option under the Tools menu that will allow you to do so. Your previous keybindings shouldn't be affected if you decide to turn the Vim emulator off.
Old post, but I was still looking for the answer, so here goes. Not enough rep to comment on the accepted answer, so I will expand on it here. It would appear that my IntelliJ did not have shortcut defined by default (maybe this has changed through the years). You must go into your settings and define a keyboard shortcut.
[IntelliJ IDEA 2020.3.3]
Settings -> Keymap -> Plugins -> IdeaVim. There should be a Vim Emulator option (which corresponds to the Tools menu option pictured above). Right-click on that item and select Add Keyboard Shortcut. Make the shortcut whatever you like...as long as it is not already assigned.
The shortcut keys will be reflected in the Tools menu if you later forget what you assigned.
Has anyone (who is using windows) had this problem that navigate back shortcut in Android Studio is not working? The shortcut key Alt+Ctrl+Left/Right Arrow is not working, which, I guess, is because of conflicting with some graphic card's shortcut. Is there a way to get rid of that?
I tried to disable the key combination in the graphic card setting, but still not working. It's intel graphic card, btw.
Another fact is that after I remove the combination in Android studio keymap, the adding shortcut setting does not recognized the key combination.
Navigation:
Control Panel[Select large icon]> Find Intel graphics option > Open
setting screen
Just try to customize new hotkeys in Intel Graphics panel,
does not metter - disable or enable this hot keys
Just disable the hot keys from the graphics option -> Hot Keys -> Disable in the tray.
Worked for me.
Edit: Added screenshot
Actually I had to reasign this hot keys for something other, then disable
For intel graphics, right-click in desktop and choose Graphics Properties (or go Control panel and Intel graphic app) then choose to Option and support tab then hotkey manager and uncheck Hot key in top, or change keys in below.
Very similar for me:
Intel Graphics Command Center -> System -> HotKeys -> Enable System HotKeys: Off
Please note, that if it is already turned off, turn it on and off again. I'm not kidding. I had to do the same thing.
If you are using windows 10, just disable the hotkeys of Graphics
Go to Desktop.
Right-click anywhere on the desktop screen.
Select "Graphics Options" -> "Hot Keys" -> "Disable"
Solution For Ubuntu
Not all navigation keyboard shortcuts are listed in Settings GUI therefore you won't be able to unbind CTRL+ALT+←/→ from there.
Verify that CTRL+ALT+←/→ are effectively bound to "Switch to workspace left/right":
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-left
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-right
Unbind the shortcuts:
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "[]"
The easiest solution for any issue related to keys is to Restore Default Copy.
To restore go to File -> Settings -> Keymap -> Select Windows/Default copy (If you are using default Keymap or select your current keymap) from drop-down then click on the small settings button and select Restore Default Copy in the option.
The default IntelliJ / Android Studio "Redo" action shortcut is CTRL+Shift+Z and this is a common problem for Windows users.
A bigger problem is CTRL+Y is mapped to the "Delete line" action - and this causes the undo stack to be lost.
To solve this issue, how can the "Redo" shortcut be changed to CTRL+Y in IntelliJ?
Open Settings (press CTRL+ALT+S)
Click Keymap on the left list.
There is a combobox that contains keymaps. Select one of them (default means IntelliJ of course. We can't change any of pre-defined keymap however we can copy, edit and then use the edited one. So) we should copy "default" to change only redo mapping.
Give a new name to your copied keymap.
Right click on:
Main Menu -> Edit -> Redo to click "Add Keyboard Shortcut"
Press CTRL+Y
Click OK
Click "Remove" to "the shortcut is already assigned to other actions. Do you want to remove other assignments?"
If you want to use any "remove line" shortcut also, then go to delete line shortcut and give to it any other shortcut (like 5th step)
Click OK to close settings window.
Change the keymap setting to the Visual Studio, Eclipse, or NetBeans preset.
The settings window can be found under File > Settings. CTRL+ALT+S should work if the shortcut hasn't been changed. In the settings window you should find Keymap under the Appearance & Behavior settings list.
You can configure each editor command to a key combo that you like (as #ismail yavuz mentioned) such as for Redo to CTRL+Y or you can just change the Keymap setting to an editor that you are used to. This might be best if you are in the process of switching to IntelliJ as it is probably the path of least resistance. The default settings for the Visual Studio, Eclipse, and NetBeans keymaps all map Redo to CTRL+Y.
The Principle of least astonishment is strangely violated for Windows users but at least shortcuts is customizable. Because of this command being so contrary to the Windows experience I decided it wasn't worth learning the IntelliJ keyboard when anywhere you're working at you need to, you can quickly change. There are almost no drawbacks to not learning the IntelliJ. Remember that in the keymap menu you can search for a command in the search box or click on the magnifying glass on the right to search by key combo.
Of course neither answer is wrong. Chose your preference.
Currently I have to open Team Explorer and click on Source Control Explorer as below snapshot.
I do this very often and need a hotkey for that.
What is it then?
Try with below step:
Go to Options of Tools menu
Select the Keyboard from Environment
Select View.TfsSourceControlExplorer from Show commands containing:. You can type View.TFS in the textbox to filter the list.
Enter your hotkey in Press shorcut keys => click on Assign
Hope it helps!
According to a comment that I found in the site that #Adarsh mentioned, Alt+V,E,S will open the Source Control Explorer. It's a couple extra keystrokes but it works for me!
You can use Ctrl+0,P to open the Pending Changes Window.
You can find all the shortcuts for team Explorer on this blog: http://blogs.msdn.com/b/buckh/archive/2012/06/06/team-explorer-2012-keyboard-shortcuts.aspx
Update:
In Visual Studio 2013 Ctrl+0,P doesn't seem to work to open Pending Changes, but you can use Alt-V,E,H or configure a custom shortcut in the menu Tools/Options/Environment/Keyboard.
Just wanted to share another alternative I learned. One could set an alias in VS Command Window and launch it from there.
alias sce View.TfsSourceControlExplorer
note- 'sce' is an alias of your choice. I generally abbreviate. Obvious but having a pattern will be helpful if you have many of these.
Steps:
Open command window (ctrl+alt+A)
Set the alias (the statement shown
above)
Next time you need to launch the Source Control Explorer,
switch/launch command window and type your alias name. 'sce' in the
above example.
Alt+V,E,S works for me even in VS 2015
In case you like to see more shortcuts, please visit this site
http://visualstudioshortcuts.com
IN VS 2015
Toolbar=>Team=> Manage Connections =>(window like solution explorer will open on right side) Team Explorer- Connect=> Beneath the home symbol ==> Click "Connect"=>Click "Source Control Explorer"