Backspace button removing only one previous character in Android Studio - android-studio

Is it possible to modify the default functionality of the backspace button from the keybord for Android Studio? I would like the backspace key to always remove only one character (as it was in Eclipse). Currently clicking the backspace sometimes reverts me to the previous line, not removes the one previous character.

If I understood your question correctly here is what you have to do!
Open setting and search for "Smart keys" in the search bar, then replace backspace functionality like in the picture.

Related

MSVC IDE search behavior

In all Visual Studio IDEs whenever you press Ctrl-F or Ctrl-H to open the search/replace edit box the IDE always places there the text under cursor. Is there way to make it to leave the present text intact instead? In all Delphis there is an option which I always uncheck: "Find text at cursor", but I couldn't find similar in MSVC.

How to turn off auto-indenting in Java in Android Studio (2.1.1)? (Windows 7)

If I have a line with 8 spaces (yes, spaces, not tabs) and some text...
x=3;
... and my cursor is placed after the semicolon, when I hit Enter it positions the cursor under the x. In other words it indents it 8 positions. If I then hit backspace it positions the cursor after the semicolon! I expect the backspace to take me back 1 space on the new line.
In Editor>Code Style > Java, Tab size = 1, Indent = 0, Continuation indent = 0. N.B. that if I try to set Tab size to 0 it's 1 next time I bring up that dialog, so 0 is apparently not acceptable to Android Studio, even though I see it suggested in several S.O. questions.
In Editor > Code Style I UNchecked Detect and use existing file indents for editing and now if I hit Enter with the cursor after the semicolon it positions the cursor 4 spaces in the from the right, in other words it still indents, just not as much.
N.B, that after making these settings I did a File > Invalidate Caches / Restart.
I don't want any automatic indenting. When I hit Enter I want it to position the cursor at the first position of the new line, and when I hit backspace I want it to go back 1 position, just like an ordinary "dumb" editor. How do I turn off all automatic indenting in Android Studio?
Android studio tries its best, like most IDEs, to help you organize your work and make it successful. It is normal, but of course, there is a way to disable it.
Note: Your project can be really messy when disabling this, if you want to properly indent a block of code, highlight it then press CTRL+ALT+L, this will indent the highlighted for you.
So, to disable it, press CTRL+ALT+S, this will open settings. Now, go to the Editor tab at your left, where you then go to General, then Smart Keys. You should see a "Backspace" part. Over there, there will be a dropdown menu, click that then select the "Disabled" option. (Settings>Editor>General>Smart Keys> )
Is this just the normal, expected behavior of A.S.?
I'd say it's the normal expected behavior of any IDE to indent correctly while you are typing. Your next line is supposed to start at the same position than the previous and if you close a bracket A.S. will automatically unindent it once.
Now on your topic :
To make your backspace key just delete the space you can go to : Settings -> Editor -> General -> Smart Keys -> Backspace -> Unindent and put 'Disabled' instead of 'To proper indent position'

[IntelliJ IDEA][Android Studio] Autocomplete when using semi colon key

Resharper has (or had) a feature allowing autocompletion to be triggered when pressing semi colon, so I don't have to press enter to autocomplete and then semi colon.
I can't find how to enable this feature in IntelliJ/Android Studio. Is there any way to do this?
IntelliJ has something similar, but it works for space, dot and semicolon (maybe other characters). Not sure if the behavior can be modified if you want IntelliJ to autocomplete only on semicolon. Here is how you enable it:
Go to Settings/Editor/General/Code Completion
Enable Insert selected variant by typing dot, space, etc.

Resharper move line up down not working

I can't make it working, move line up or down doesn't work. When I reset keyboard for VS and applay scheme for Resharper it ask me for this :
and if I take first selection , then alt + up switch me between methods, if I use second selection then this combination does not effects.
Alt+Up is not a ReSharper shortcut to move a line. It most likely belongs to the Productivity Power Tools extension, that has a feature to move one or more (selected) lines.
Personally, I don't like this feature in PPT, since it will just move the line(s), regardless of their scope, causing compilation errors. I much rather use ReSharper's feature of moving blocks of code up or down, by pressing Ctrl + Shift + Alt + ↑/↓ or ←/→ - when on the beginning of the line, it will move the entire line or block of code, but can also be used to move entire methods, change the order of parameters, etc.
I ended up resetting my Resharper shortcuts. Then when prompted with the dialog, chose Use Visual Studio Commands for the Alt+Up & Alt+Down shortcut.
You could also set this manually in Tools > Options > Environment > Keyboard. Search for "MoveSelectedLines" and then assign Alt+Up/Down to the appropriate command.
On my machine with Resharper 2016.1 it makes a difference on what position the cursor is located:
cursor located from 1st to last character on the line: the shortcuts work as described by Igal Tabachnik
cursor located on white spaces before 1st characters of the line the shortcuts are ignored.
Regards
Bernhard

edit gvim mouse buttons

I have a two part question regarding mouse clicks on gvim.
1.) I would like to change my gvim double left mouse click into something similar to the windows environment (ie Notepad, Microsoft Word), wherein it: highlights the current word, and replaces it with whatever I type. This is akin to pressing 'cw' for changeword in vim.
2.) I would like my single mouse click to place a cursor upon the selected text and enter insert mode. Again like how a mouse normally behaves in Windows.
1) nmap <2-LeftMouse> ciw
You could use viw here, which will visually select the current word, but then you will still have to press c to replace it.
2) nmap <LeftMouse> <Leftmouse>i
Or replace the i with an a if you would prefer to append, rather than insert.
You can use behave mswin or so $VIMRUNTIME/mswin.vim so set up a lot of stuff so that it works more like a regular windows program.
The specific setting you are looking for are:
set select=mouse
this causes the mouse to start select mode instead of visual mode. Select mode causes the selection to be deleted and insert mode to be entered when a printable key is pressed.
As in Prince Goulash's answer
nmap <LeftMouse> <LeftMouse>i
will turn on a sort of click-to-type mode.

Resources