This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[BUG FILED]Automatic indentation of subsequent lines in kate

Tags: None
(comma "," separated)
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
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.
User avatar
sredna
Registered Member
Posts
225
Karma
1
OS
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.
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
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.
User avatar
sredna
Registered Member
Posts
225
Karma
1
OS
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.
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
sredna wrote: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.

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.

sredna wrote:Another option is to write a new indenter - they can be written in javascript. Look in /usr/share/apps/katepart/scripts/indentation for inspiration.

Unfortunately, I don't know javascript. :(
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft