Bug 194014

Summary: try to detect coding style of current document to decide wether to indent with tabs or spaces
Product: [Applications] kate Reporter: Marcel Partap <mpartap>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: waqar.17a
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Marcel Partap 2009-05-25 12:29:23 UTC
Version:           3.2.87 (using 4.2.87 (KDE 4.2.87 (KDE 4.3 >= 20090519)), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.30-rc3-dirty

With my customized settings not being available i was editing some kde code when i noticed my indentions were done with tabs instead of spaces. First idea i had to change the kate default settings of the options "Highlight trailing spaces" and "Insert spaces instead of tabulators" to enabled. But though i really think they both should be made for a quick fix (provoking casual developers to send in patches with trailing spaces and tab instead of space indented), it would be even better if additionally kate would try and detect how the preceding and following lines are indented (tab or space) and adapt to that fluidly. Yeah coding style, it's a controversial topic... What do you think?
Comment 1 Dominik Haumann 2011-07-14 20:36:58 UTC

*** This bug has been marked as a duplicate of bug 109338 ***
Comment 2 Waqar Ahmed 2022-01-15 17:08:47 UTC
Implemented in KF 5.90 https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/253