Assign a keymap to "Extract to arb file" bulb proposition - android-studio

I frequently use the option "Extract to ARB File" on the bulb to quick add translations:
Is there a way to assign a keymap to this useful function ?
And more generally, is there a way to assign keymap to bulb functions of Android Studio ?

Related

Show hints when writing function

sometimes when I write function in AndroidStudio/Intellij the hint disappear. How to restore it with a keyboard shortcut?
Screenshot below.
For Windows, you can follow these steps:
File >> Settings >> Editor >> General >> Code Completion
You can enable Basic Completion and Smart Type Completion.
For Mac OS, you can change the keyboard shortcuts.
System Preferences >> Keyboard >> Shortcuts >> Spotlight
You can disable Show Spotlight search and assign a new key.

Centre code in Android Studio/IntelliJ IDEA editor

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.

Is it easy to toggle the vim plugin if you want to disable it?

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.

How to configure IntelliJ (also Android Studio) redo shortcut to CTRL+Y instead of CTRL+SHIFT+Z?

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.

Contextual menu Mac OS X - Pasting a text string

I would like to know if it is possible to set up a contextual menu option that allows me to select a string, e.g. from BBEdit or TextEdit etc., and after selecting it > right click > call Contextual menu item > Paste/Replace with string of text.
For example, if I had a text file open and wanted to select the word "blue" I would like the contextual menu item to be able to replace that with "red."
Yes, this is like copy and pasting, but there's a reason I am asking for this specifically and it would save me tons of time at my job.
I am not an experienced programmer, so consider me to be a complete newbie.
I want to do this in Automator. I know all the steps to get to the building part, just don't know which Utilities item to use for something like this.
I did figure out how to do it with a keyboard shortcut, though I'd also like to have a universal right-click contextual menu option. I used to use some app to do this for me in the old days.
Here's what I did. Go to Automator, select "no input" and "any application" above the actions window.
On the left, click on Utilities, drag "Run AppleScript" into the window on the right.
Insert, into the middle:
tell application "System Events"
keystroke "Text You Want To Input"
end tell
Save it, then go to System Preferences » Keyboard » Keyboard Shortcuts > Services, and find your saved title. Create a keyboard shortcut.

Resources