On 19/04/2020 23:22, Florian Klämpfl via lazarus wrote:
When completing code, lazarus takes the Block indent value from the editor options for indentions, so for proper indention one sets this value to two spaces normally. However, this has the effect that tab/shift+tab also un/indents by two spaces. This is often not useful when reorganizing code. Is there any way to decouple these two behaviors: so that code completion idents by 2, tab/shift+tab by 1? Or do I need to adapt lazarus sources?
I don't think there is a 2nd setting for codetools.

But instead of using tab to (un-)indent selected lines, you can use the multi-caret feature. Go to the left most column, on the first line. Then shift-alt-down until you have a caret in front of each line you wish to change. Now either delete spaces, or insert spaces.

Of course for un-indent that does not work, if there is a line with no spaces at the front. You can over-unindent it (block + shift tab), then shift-ctrl left click at the end of a line in the selection, to convert the selection into multi carets, hit home-key to get the carets to the front of lines, and insert a space.

The un-indent will work with empty lines in the range. "del" on multicaret will not remove line-ends. (backspace will remove line ends).
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to