Android Studio 'Comment with line Comment' shortcut not working - android-studio

Whenever I press Ctrl + / to comment out a line in Android Studio in a C++ file, it just moves the caret down 1 line without making a comment. Creating a different keybinding for this shortcut has the same effect.
I've used this feature fine before, it only started happening when I opened up android studio today. I've tried disabling all plugins and restarting Android Studio to no avail.

If the keyboard shortcut doesn't work. Then try
Alt + Shift + Insert
What It will do is activate column selection mode, making it easy to just click and drag to select multiple lines of code that you can type on. It's easier than trying to make an entirely new keyboard shortcut.
The other way to do Column Selection Mode is to just right click anywhere on the code and it will be in menu popup, click to activate/de-activate.

Related

Is there a way in Android Studio to use Ctrl+tab to navigate to recently used editor?

Is there a way in Android Studio to use Ctrl+tab to navigate to recently used editor?
Android Studio has two types of switching methods, as can be seen on the keymap settings:
"Recent Editors" - shows a list of recent editors but you need to leave the ctrl key and click up/down keys then another click to select the relevant editor.
"Switcher" - shows a quick list of recent editors. Setting Ctrl+tab to this will behave like many of the other editors in the market: Notepad++, Visual Studio, Eclipse ADT, etc...
You can use Ctrl+E to list last opened or edited files, use arrow key to move up and down.
Ctrl + tab is already doing that! it shows the switcher having the most recently used editor highlighted, after releasing Ctrl key it will switch to the editor, if you keep holding the Ctrl then there are 2 ways to navigate through the switcher, either by Tab, or by up and down arrows with Enter.
Another way is Navigate-> Back/Forward which will move cursor between edit locations in same file and move along to other files, the default key mapping for those are (Alt +Ctrl + Left)/(Alt +Ctrl +Right), which conflicts with windows mapping, Personally I am using Eclipse key mapping, so they are (Alt + left)/(Alt + right).
Don't forget that you can change any key mapping or add an extra key mapping from File->Settings->Keymap

Android Studio hotkey for "do refactor"

In Android Studio I can start renaming via Shift + F6. Then Android Studio shows me a box telling me about the changes and presents me with a "Do Refactor"-button. When hovering over the button Android Studio shows me no information about a hotkey I could press. Is there a hotkey for that button?
I found that it works with pressing Alt + d.
There shouldn't be a keyboard shortcut for every button.
Usually program developers provide hotkeys just for most used basic functions.
There is Shift+F6 in Android Studio for refactoring and that's the closest option to get the functionality you want.

Shortcut to close a opened tab in android studio

What is the shortcut to close the opened tab in android studio?
I'm new to the android studio. I tried with CTRL+W. It's not working. I searched for a while. But I haven't get it. Any one please provide me the shortcut to close the opened tab.
You can try pressing CTRL+F4 in order to close opened tabs in Android Studio
As mentioned above, type CTRL + ALT + S to get into settings and in the keymap dialog search for Close, but the thing you want to reassign is
Close Active Editor
For Mac it is not set by default. Here is how I did it.
Android Studio 4.1 > Preferences > Keymap search for Close Active Editor right click > Add Keyboard Shortcut. Then assign anything you want. Alt+W is a good one.
If you right click on a tab header, the context menu shows you the current key binding next to the word Close (by default Ctrl+F4).
Follow the steps mentioned in other comments (type CTRL + ALT + S to get into settings and in the keymap dialog search for Close) and what you actually need to change is [editor tabs] / [close]
(android studio 3.6.1)
On a Mac, it's command + F4.
If you're like me, you may have to do command + fn + F4

Visual Basic 2013 - Pressing ALT gets me out of code

I just installed my Visual Basic and this is a problem I couldnt find an answer to. Everytime I press ALT it gets me out of code, and because I use SHIFT+ALT to change keyboards a lot while writing code, this is really disturbing to have to click in code again to be able to write.
Any ideas ?
Are you referring to the normal Windows way of accessing the menu via keyboard? This has nothing to do with Visual Studio; it will work similarly in almost any Windows application.
E.g. pressing Alt+F will open the File Menu etc. Just pressing Alt will highlight the menu (you should see the shortcut letters underlined for each item) and pressing a letter key will then open the menu. Instead, press Alt again to return to what you were doing before.

Releasing the find and replace pane in visual studio 2012

In Visual Studio 2012 the find and replace window has Docking alignment to the top right side, how to release it?
The "quick find" window isn't docked in the usual sense. Press Esc to dismiss it and also make the yellow-orange search result highlighting go away.
Alternatively, click the X in the top right of the mini window.
Edit.Find = docked Find window
Edit.Replace = docked Replace window
Edit.FindinFiles = undocked Find window
Edit.ReplaceinFiles = undocked Replace window
so for undocked windows you can press Ctrl + Shift + F or Ctrl + Shift + H
or alternatively change shortcuts in Options > Environment > Keyboard to reach desired windows easier.
This is not possible unfortunately, which really drives me nuts when trying to find something in a minified file (single line) since the find window commonly blocks the found result.
Last post I could find about it:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/3636907-let-me-undock-the-find-and-replace
The best solution I can find is copy and past file into notepad and find there (for my needs).
In Visual Studio 2012 all docked windows can be released as follows;
Docked Window's Header right click menu (or click Window Position Icon what located the far right of the header)> Float menu
If the usual things, as already suggested, won't work, here are two other ideas I have found to work with oddities in Visual Studio.
Disable all plugins and try again (had a weird case of VS crashing on Ctrl+S and it was a faulty plugin)
Try a repair on the install, could have some faulty files.

Resources