PHPStorm deletes line if Backspace is pressed on the default indentation level - ide

After upgrading from 7.x to 8.x I noticed an annoying new "feature". When on an empty line (after pressing enter), then pressing backspace (which used to get rid of the indentation character right in front of the caret) the line is erased and the caret jumps back to the end of the line above.
Given the following code snippet and caret placement:
pressing Backspace does this:
How do I turn this off?

As of PhpStorm 9+, this setting is located in it's own section under Editor > General > Smart Keys > Backspace. Setting the Unindent drop-down to Disabled will give you the behaviour you would expect.
The solution is to disable "Backspace smart indent" by going to File > Settings (or pressing CtrlAltS) then
navigating to IDE Settings > Editor > Smart Keys
searching for Backspace smart indent
and removing the tick from check box next to said option.

Related

PhpStorm IDE: Keyboard Home/Pos1 should move caret to real beginning of the line (character position 0) instead of the beginning of the first word

I'm in the process of switching (with some specific PHP production context) from Sublime Text(4x) to PhpStorm (2022.2).
I am of course trying to migrate as many features/habits as possible, as identical as possible to my new environment. Many things I have managed to do but I have a showstopper when it comes to using/keymapping the Home-/Pos1-Button as I was used to.
What I want:
Being somewhere in a line of (PHP) code I want to press the Home-/Pos1-Button to immediately get to the (really) first character(0) of the line which is the widespread default behaviour of that key.
What I get (problem):
When I hit that button once PhpStorm IDE moves the caret to the beginning of the first word/non-whitespace character of the current line and I need to hit the key again to really get to the beginning of the line. I have tried a couple of things but I get the feeling this is "intended" non-configurable behaviour...
Any help would be greatly appreciated.
I tried googling and configuring Settings > Editor > Keymap in many ways but did not succeed...
Go to Settings (Preferences on macOS) | Editor | General | Smart Keys | Home moves caret to first non-whitespace character -> disable.

IntelliJ IDEA Keymap

How can I make the Home key move the caret to the beginning of the current line? I am aware of the Keymap setting "Move Caret to Line Start". I have re-mapped this to Home.
But this actually seems to move the caret to the start of the text on the line, not the start of the line (i.e. column 1). Pressing Home again will move it to the start of the line.
I have also tried using the IdeaVim plugin. In my case, the full VIM key mappings are not desired, but I did notice that it is capable of making Home move the caret to the start of the line, which to me implies that it's possible.
In NetBeans, there are different commands for "start of line" and "start of text on line". I haven't yet been able to find that with IDEA.
Settings (Preferences on macOS) | Editor | General | Smart Keys | Home moves caret to first non-whitespace character -> disable.

PHPstorm scrolling with keyboard

I'am looking for an option to force scroll code when entering with keyboard cursor in example at 5 line from the end.
Default behavior is to scroll code when entering 1st or last visible line of code.
I would like to change it even for 10th from the beginning and 10th before last.
It appears the base IDE does not have an option for this. However, the behaviour is available in the IdeaVIM plugin (docs) under the scrolloff option.
'Scroll offset' mode can be enabled for the current session with the command:
:set scrolloffset=10
Add that to your ~/.ideavimrc to make it permanent.
NB: IdeaVIM changes the IDE to behave more like vim*, which may require some re-training.
If you're not familiar with Vim:
Install the IdeaVIM plugin (via Settings → Plugins → Browse Repositores → type 'ideavim' in search)
Restart the IDE
Open a file
Note the caret is a block like █; this indicates 'normal' mode
Press : to enter the 'command' mode
Type set scrolloff=10 then Enter
Scroll around, notice the editor scrolls before the caret gets to the very top (or bottom)
Press i to enter 'insert' mode, and edit your file as usual
Press ESC to return to 'normal' mode
Interactive vim lessons
openvim.com
vim-adventures.com
* It seems difficult to have the plugin only modify the scrolloffset behaviour and leave the rest per the default IDE.
You can set "EditorMoveUpAndScroll" shortcut.

Basic indentation settings in Xcode

The default settings in Xcode 3.2.6 do some automatic indentation: typing if (something) and pressing return (when the cursor is to the right of the closing paren) automatically indents the cursor by one tab. How can I turn this feature off?
I tried turning off "syntax-aware indenting" however this doesn't solve the problem. Pressing return in the above example still indents the cursor (it's aligned with if in this case).
My ultimate goal is to avoid "stray tabs" (blank lines that have tabs).
You could hook in a code beautifier to clean up the tabs afterwards: http://robertjpayne.com/post/9092159751/using-uncrustify-directly-in-xcode-4

How do I turn off the unlimited whitespace in IntelliJ editor?

How do I remove the ability to move the cursor after the end of line in IntelliJ?
File menu -> Settings -> Editor -> General -> Virtual Space and uncheck 'Allow placement of caret after end of line' . You may also uncheck the other options in the Virtual Space panel.
If the other answers don't seem to be working, you might have Column Selection Mode enabled. On my Mac it's mapped to Cmd+Shift+8. It's located under the Edit menu. That menu item will show a little checkmark when the mode is enabled.
To get the expected behavior where indentations are respected when you click on a line :
In Preferences > Editor > Virtual Space
Check :
Allow placement of caret inside tabs.
Uncheck :
Allow placement of caret after end of line.
This was really annoying to me and makes very little sense as a default behavior to me.
Note that for Intellij IDEA 11 for mac, settings are placed under the IntelliJ IDEA menu and called preferences. (Maybe some sort of mac default ?)
What Matt_Bro said (first answer), but if you've already got the box unchecked in preferences, try re-checking it (I checked all the virtual space boxes) and restarting. Then uncheck and hit apply--at this point unlimited space was disabled for me.
IntelliJ IDEA 2016
By default, it's turned off (unchecked).
If it is turned on, you can use one of the following 2 approaches:
File > Settings... (or Ctrl+Alt+S) > Editor > General > Virtual Space section > uncheck Allow placement of caret after end of line
Help > Find Action... (or Ctrl+Shift+A) > type "Virtual Space: Allow end" > Enter or left click (to switch between On and Off) > Esc