Snippets and indenting

Alan Prescott alanjprescott at gmail.com
Sat Mar 12 16:16:25 GMT 2022


Since you're asking for comments (Planet KDE 10th March) ...

I first reported this as Bug 423352 "Snippets should be able to turn off
automatic indenting" in 2020.

I use Kate for developing various scripts in Python but the way the
snippets insert into Python source is a real mess, making them almost
unuseable except for very short, one-liner snippets.

Basically the problem is that the insert follows the indenting rules of the
file being edited and restructures the saved snippet. I'm guessing that
this doesn't cause a problem with languages like C, PHP etc. but with
Python the indenting ends up breaking the Python rules.

The simplest solution (I'm guessing!) would be to make it possible to
temporarily turn off Kate's automatic indentation while inserting a snippet
so that the snippet is inserted exactly as written, possibly as an option
in specific snippets.

Thanks for Kate - it's an excellent text editor.

Alan Prescott
alanjprescott at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20220312/44e86fb6/attachment.htm>


More information about the KWrite-Devel mailing list