| View previous topic :: View next topic |
| Author |
Message |
qoshinator
Joined: 11 Apr 2012 Posts: 36
|
Posted: Sun Jul 22, 2012 12:20 am Post subject: Pressing space when selection is active |
|
|
| When I select text from multiple lines and press space, the text is indented instead of replaced. How do I change this behavior? |
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4646
|
Posted: Sun Jul 22, 2012 12:47 am Post subject: |
|
|
Hotkeys plugin
Name: "Insert space"
Command: Insert(" ")
Hotkey: Space |
|
| Back to top |
|
 |
foliator
Joined: 13 Nov 2011 Posts: 17 Location: BC, Canada
|
Posted: Tue Jul 24, 2012 9:34 pm Post subject: |
|
|
| Instructor wrote: | Hotkeys plugin
Name: "Insert space"
Command: Insert(" ")
Hotkey: Space |
I had the same problem for a long time, Instructor, and your instructions solved it. However, I've assigned Alt Space as the hotkey, because assigning just Space by itself will disable a very useful function of the spacebar in AkelPad: It can indent a whole paragraph one space at a time, or in the case of columns, it can move a whole column to the right one space at a time. Very handy! |
|
| Back to top |
|
 |
Visitor7
Joined: 03 Jun 2012 Posts: 88
|
Posted: Wed Jul 25, 2012 11:57 am Post subject: |
|
|
| foliator, on standard keyboard easier to use the Del or Backspace. |
|
| Back to top |
|
 |
qoshinator
Joined: 11 Apr 2012 Posts: 36
|
Posted: Fri Jul 27, 2012 4:41 am Post subject: |
|
|
Maybe "auto-indentation with multi-line selection" would be better if it only triggered when you selected every character in the multiple lines, rather than whenever you select multiple lines. So: if you select "ABC\nDEF" below, indentation will trigger, but if you select "C\nDEF", it will not, since the "AB" is missing.
ABC
DEF
One problem with the existing behavior is that the entire lines are selected. For example, if you select "C\nDEF", press space, then start typing, then the entire "ABC\nDEF" will be erased rather than just "C\nDEF". If the user doesn't realize this quickly, then the deletion of "AB" can be buried below a huge edit history or even worse, lost after saving.
However, I don't find the indentation feature useful in general. Alt+select already implements multi-line indentation, and more robustly too because you can indent in any column rather than just the first column. Also, with auto-indentation, the user must look at the screen to figure out if selecting and typing will replace text or indent it; this causes paranoia which is no good.
Since auto-indentation with multi-line causes headaches and is strictly worse than alt-select, I don't think it should be the default behavior. Perhaps it could be moved into a plugin? Just my two cents. |
|
| Back to top |
|
 |
qoshinator
Joined: 11 Apr 2012 Posts: 36
|
Posted: Tue Jul 31, 2012 4:35 am Post subject: |
|
|
| qoshinator wrote: | | Alt+select already implements multi-line indentation, and more robustly too because you can indent in any column rather than just the first column. |
Actually, I just discovered this wasn't true. In Visual Studio, if you use Alt+Select to select a block of characters, and then type "a", then the character "a" will appear in each selected row. This isn't implemented in AkelPad. |
|
| Back to top |
|
 |
|