SUMMARY Inserting a snippet into the code follows the indexing rules for the language. When the language is Python it makes a mess of indenting because there's no way to detect end of block. The indenting gets really messy very quickly with multiple if .. elif .. or try ... except blocks. If individual snippets could temporarily switch of automatic indenting - or, even better, set the same indenting for each inserted line then the snippet could be set up with indenting as required and could be inserted verbatim. STEPS TO REPRODUCE 1. Set up a snippet for a Python script as:- <code> def my_func(): """my example function """ if True: print('True') else: print('False') return True </code> 2. Insert snippet into Python 3. OBSERVED RESULT <code> def my_func(): """my example function """ if True: print('True') else: print('False') return True </code> Producing an indentation error in Python/pylint EXPECTED RESULT <code> def my_func(): """my example function """ if True: print('True') else: print('False') return True </code> SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Currently running Version 21.12.3 of Kate and this has been implemented. Thank you, thank you, thank you :-)