![]() Registered Member ![]()
|
When I use kate, it automatically indents the next line to the same level of the current line. Hence, if the current line begins with x tabs, after pressing enter, the new line starts with x tabs. However, this only works consistently if x ≥ 1. If the current line begins with no tab, then one of two things happens. If there are other character(s) on the current line, then the next line also start with no tab (as expected). However, if the current line is blank, then the next line starts with the most-recent non-blank line's indentation. This seems counter-intuitive to me. Is this expected behaviour, and is there a way to prevent this?
If important, I have kate's "Default indentation mode" set to "Normal".
Last edited by sparhawk on Sat Mar 02, 2013 10:33 am, edited 1 time in total.
|
![]() Registered Member ![]()
|
Look in the tools menu for the current indentation mode, and change it to "normal" or "none" if you prefer that. The indentation mode is set when you open a file where the mode for the file defines that, for example many souce or markup files.
|
![]() Registered Member ![]()
|
I did try "none" vs. "normal". My experience is that the former provides no automatic indentation, although I do want it. The latter seems to suffer from the bug (feature?) that I mentioned in the OP.
|
![]() Registered Member ![]()
|
If you feel the default "normal" indentation is having a bug, a good action would be to report to bugs.kde.org - use the help->report bug menu item for an easy way in.
Another option is to write a new indenter - they can be written in javascript. Look in /usr/share/apps/katepart/scripts/indentation for inspiration. |
![]() Registered Member ![]()
|
Yes, I'll be happy to report a bug, but I just thought this was such as obvious (to me) bug that it would have irked someone else… unless it were a feature. I wasn't really sure how it could be a feature, which is why I was posting here first before reporting it as a bug.
Unfortunately, I don't know javascript. ![]() |
![]() Registered Member ![]()
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft