https://bugs.kde.org/show_bug.cgi?id=423352
Bug ID: 423352 Summary: Snippets should be able to turn off automatic indenting Product: kate Version: 18.12.3 Platform: openSUSE RPMs OS: Linux Status: REPORTED Severity: wishlist Priority: NOR Component: plugin-snippets Assignee: kwrite-bugs-n...@kde.org Reporter: alanjpresc...@gmail.com Target Milestone: --- 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 -- You are receiving this mail because: You are watching all bug changes.