It's not a bug actually, but very strange behavior for advanced text editor. Accordingly to source code radio button "Increase indentations level if in leading blank space" enables so called "Smart Tab Mode": KateDocumentConfig::global()->setTabHandling(KateDocumentConfig::tabSmart); But it works in absolutely opposite way than expected. When we say about "Smart Tabs" usually is mentioned something like described here: https://www.emacswiki.org/emacs/SmartTabs Short quote from link above: "There is a semantic way of using tab characters in source code: tabs for indentation, spaces for alignment. This ensures that the code is displayed correctly everywhere, regardless of the viewer’s tab size." Reproducible: Always Steps to Reproduce: 1. Start any application based on ktexteditor component (e.g. kate) 2. Go to Indentation Config dialog (Kate-specific example: Settings -> Configure Kate... -> Editing -> Indentation) 3. Select Default indentation mode: Normal Check radio button "Tabulators and spaces" in "Indent using:" group box. Check radio button "Increase indentations level if in leading blank space" 4. Press "Tab" 5. Input some keyword 6. Press "Tab" again Actual Results: String "....keyword\t", where '.' - space symbol, \t - tabulator; Expected Results: String "\tkeyword...." ktexteditor version 5.19.0
The reporter prefers first indention to be a tab and subsequent tabs to be replaced with equivalent number of spaces. The "Indent using" option is clear for (1) Tabulators, (2) Spaces, (3) Tabulators and spaces. The value of a fourth option (4) Tabulator and spaces is debatable since you might as well just indent with (2) spaces.