Snippets and indenting

Alan Prescott <[email protected]>
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <CACmj21DZ0D1VRke3D3Qsu3howEVJ0AiLJAN2fJvE1H9ffS6wWA@mail.gmail.com>
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
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.