Version: 4.1.69 (using Devel) Compiler: gcc OS: Linux Installed from: Compiled sources kwrite inserts always spaces instead of tabs. Changes in Configure Kwrite -> Editing -> General -> "Insert spaces instead of tabulators" doesn't have any effect. This is really bad cause Makefiles needs \t as separators.
Works here last I checked, unless it broke recently. Is your indent width == your tab width? Note: you might want to use the "command line" (F7 by default; View->Switch to Command Line) and issue the commands "set-indent-width 4", "set-tab-width 4" and "set-replace-tabs off" (and maybe "set-replace-tabs-save off"). If that works, then the problem is either in the GUI option setting or the filemode default settings.
That is unexpected ... when I set tab width == indent with I'm able to create tabs. But isn't it a bug if kwrite create space indends instead of \t, if in configure->editing options->insert spaces instead of tabulators is off. BTW. Where could I find docs about the command line commands. I did not find a menu entry View->Switch to Command Line
> > BTW. Where could I find docs about the command line commands. In Kate's Handbook Chapter 6. Advanced Editing Tools -> The Editor Component Command Line > I did not find a menu entry View->Switch to Command Line It is in the Kwrite Handbook since r607981 (22 months, 3 weeks ago) : "The Menu Entries The View menu The View menu allows you to manage settings specific to the active editor, and to manage frames. [snip] View->Switch to Command Line (F7) Displays the Katepart command line at the bottom of the window. In the command line, type help to get help and help list to get a list of commands."
> But isn't it a bug if kwrite create space indends instead of \t, if in configure->editing options->insert spaces instead of tabulators is off. Not if you have it configured so tab indents rather than inserting tabulators? If tab-width == indent-width gives you tabs and you've asked the tab key to indent, I think that's correct behavior. Otherwise if you disable indenting with the tab key, I think you should get tabs unless your options are to use spaces instead of tabs. Clear as mud?
The other bug should be used for adding feature to always be able to force tab insertion. *** This bug has been marked as a duplicate of bug 145664 ***
Yeah, it's as clear as mud. It might be working according to design, but I shouldn't need to peruse bug reports to figure out how to make the dang tab key work! Whoever designed this behavior wasn't thinking. The default should be tabs, in my opinion. If it isn't, there should be a quick and intuitive way to fix it. (ex: a check box "link to indentation width - causes tabs to appear instead of spaces" )
(In reply to Matthew Woehlke from comment #4) > > But isn't it a bug if kwrite create space indends instead of \t, if in configure->editing options->insert spaces instead of tabulators is off. > > Not if you have it configured so tab indents rather than inserting > tabulators? If tab-width == indent-width gives you tabs and you've asked the > tab key to indent, I think that's correct behavior. Otherwise if you disable > indenting with the tab key, I think you should get tabs unless your options > are to use spaces instead of tabs. That would be perfectly correct if it would be this way in reality. Unfortunately I cannot configure KWrite to insert TAB character when I press TAB key and use only spaces for indent at the same time (at least for KWrite 5.0.0 with KDE Frameworks 5.12.0). In Settings->Editing->Indentation->Tab key action: (1) "Always advance to next tab position", (2) "Always increase indentation level", (3) "Increase indentation level if in leading blank space". None of them insert TAB character if I set "Indent Using" -> "Spaces". There must be some option like "Always insert TAB character" (probably instead of "Always advance to next tab position" - that is completely useless if it inserts spaces).
There is a bit hidden way There is an action that can be assigned a shortcut for inserting Tabs no mater what the indentation mode is. Settings -> Configure Shortcuts: "Search for Tab" and assign a shortcut for it. I have assigned the Tab key for this (reassigning from some other action)