Version: (using Devel) Installed from: Compiled sources Compiler: gcc-4.3.0 OS: Linux I encountered this in kdevelop4 and kwrite. I gonna explain it referring to kwrite. Be n_indent the number of spaces selected at Editing->Indentation->Indentation width Be n_spaces the number of spaces selected at Editing->General->Tab width If n_indent < n_spaces is true kate always inserts spaces for tabs. Since the default is n_indent = 2 , n_spaces = 8 always replacing tabs spaces is the default as well. This leads to a bad user experience if Makefiles are used to be edited. -- Maik
I can confirm this. Pressing tab at the start of line inserts spaces unless tab width = indentation width. (As a sidenote: This in illegal syntax for Makefiles and should be marked as an error by the syntax highlighter.)
I think this is by design. If you press tab four times, one tab character will be used as four intents. You can change this behaviour in Editing->Indentation->Tab key action (Always advance to next tab)
Thank you Robin. My first thought when reading your comment was this should really be the default to ensure editing Makefiles isn't broken by the defaults. But Erlend mentioned on irc that a missing indention script for Makefiles it the actual reason. However, an editor that cannot edit Makefiles out of the box is IMHO worth a bug report :) . But the title of this bug report is should be: "kate by default inserts spaces for a tab in Makefiles" I suggest this one stays open until an indention script for Makefiles is included in trunk. Best, -- Maik
> But Erlend mentioned on irc that a missing indention script for Makefiles it the actual reason. Well, IF there was an indeting script for Makefiles (which would be quite easy to write I guess) and it was possible to insert tabs, that would solve the problem since the rule would be: always use a literal tab character for indentation.
I have this problem in kde 3.5.9.5 and i hope this problem be solved. it is a stupid to go to configuration and change indention type when having different files open and it is very usual for me to have many files(html,css,c++,bash script, python, ...) open in different languages in different kde invironments including kate and quanta. moreover i see kate has missed indention for many scripts including bash
according to my irc chat in #kate i made a wish for my comment instead of this bug. http://bugs.kde.org/show_bug.cgi?id=163281 so my above comment can be removed and be considered as that bug.
With regard to the Makefile problem: In KDE3 there is a File Type for Makefiles. The file type says kate: space-indent off; indent-width 8; replace-tabs off; replace-tabs-save off; This would be the right fix for KDE4, too. There we switched to modes, every highlighting leads to a mode. The mode for Makefiles should be preconfigured. Where do we ship this kind of information? In KDE3 we had kdelibs/kate/data/katefiletyperc that had the predefined one: [Makefiles] Mimetypes=text/x-makefile Priority=5 Section=Other Variables=kate: space-indent off; indent-width 8; replace-tabs off; replace-tabs-save off; Wildcards=*Makefile*;*makefile* and several others. We have to reintroduce this to have proper defaults in KDE4, too. Just open the config dialog and go to Open/Save > Modes & Filestypes and changes something. Now save it by clicking OK. Now you will have the file $HOME/.kde.../share/config/katemoderc, that has the correct content. The correct fix imho is to install a katemoderc file with sane defaults. KConfig & friends will merge the options then. Any volunteers to add it to svn and try whether it works? :)
Any reason this can't be closed as a dup of bug 163315?
*** This bug has been marked as a duplicate of 163315 ***
please close the other way round, as the other report has much more info... even info how to fix it.
Duping other way round.
*** Bug 163281 has been marked as a duplicate of this bug. ***
> please close the other way round, as the other report has much more info... IMO this one has too *much* info which is why I closed it as I did. For now, I'm changing the summary of this. Someone please either re-close this, or close bug 163315 as duplicating this.
*** Bug 163315 has been marked as a duplicate of this bug. ***
I just asked at the #kate channel about this bug report. The response was, that there is no value in putting time into full Makefile editing support. IMO, this rules an editor component out from being an serious development tool. Makefiles are all around and will stay for a long time (CMake i.e. generates Makefiles for the most of us). Many beginners will go though the Makefile road before they learn to embrace an full featured build tool, like CMake. Regards, -- Maik
No Maik, this is _not_ what I said. And additionally, it was just _my_ opinion. I don't know whether other people want to work on it. I never said that this is a WONTFIX! To reiterate what I said to Maik: 1) I _personally_ don't see the need to fix this bug as so grave. Especially not with so many _easy_ workarounds available. 2) Makefile editing is _in my eyes_ not crucial for a "serious development tool". And even if it is, it's imo pretty bold to say that just because Kate is lacking in this regard it's broken/rubbish in it's whole. 3) It's hard to accept, but in FOSS many people just don't share your opinion. You'll have to discuss it with them and accept if someone disagrees with you. I tried explaining you what I repeated above, and you just went away. Again: If someone comes up with a fix, it will be integrated in Kate. It's just not _me_ who does it.
Milian Wolff: > I _personally_ don't see the need to fix this bug as so grave. Especially > not with so many _easy_ workarounds available. _easy_ workarounds are workarounds non the less. I did not make this bug report because I didn't know how to get around it, I'm not a noob. I made it, because many people tasting kate for the fist time will face this problem and a good portion of them will just walk away. Another reason was, that I was curious how you guys deal with such little flaws, before I start work on kate myself. >If someone comes up with a fix, it will be integrated in Kate. > It's just not _me_ who does it. The age of this bug report tells me, that there is nobody in the kate community who cares very much about this, not just you. Regards.
(In reply to comment #17) > Milian Wolff: > >If someone comes up with a fix, it will be integrated in Kate. > > It's just not _me_ who does it. > > The age of this bug report tells me Its just a bit more than a year. There are much much older bugreports open for kate. >, that there is nobody in the kate community > who cares very much about this, not just you. That may very well be because none of the developers uses plain Makefile's these days and only few of them (if any) have time for kate development at all. Personally I _never_ even tried to learn them, I do know a bit so I can understand the easy ones, but I don't see a single reason for writing Makefile's manually. Or even looking at the generated Makefile from CMake.
SVN commit 1038772 by dhaumann: Makefiles always use tabs -> add predefined mode: kate: tab-width 8; indent-width 8; replace-tabs off; replace-tabs-save off; BUG:163220 M +3 -0 katemoderc WebSVN link: http://websvn.kde.org/?view=rev&revision=1038772
SVN commit 1038801 by dhaumann: Makefiles always use tabs -> add predefined mode: kate: tab-width 8; indent-width 8; replace-tabs off; replace-tabs-save off; Far too much bla bla in the bug report. Why don't you just fix it. Moo. CCBUG:163220 M +3 -0 katemoderc WebSVN link: http://websvn.kde.org/?view=rev&revision=1038801
Thank you Dominik!