I'm mildly OCD when it comes to formatting my code.
One thing I do quite often is align variables like this (using tabs for spacing):
$var1 = 'hello';
$var204 = 'world';
// edit.. seems these forums converts the tabs to spaces.
// I was trying to show that I align the equals signs.
|
However, on some of my older scripts I used spaces for spacing.
In the process of converting these spaces to tabs, I've noticed that if I highlight all of the spaces and hit tab, it indents the line instead of replaces the spaces.
I'd like for it to replace the spaces when I hit tab instead of indenting the line.
Logic:
if selection contains all spaces, then insert tab, else indent block