[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: A doubt on language-specific indentation settings
From:       Andrew Udvare <audvare () gmail ! com>
Date:       2014-11-24 10:21:56
Message-ID: 5CF5E7BE-89A5-48EA-96FE-0BFF138CC044 () gmail ! com
[Download RAW message or body]


> On 2014-11-24, at 01:46, Miquel Sabaté <mikisabate@gmail.com> wrote:
> 
> Hi there,
> 
> Currently we have in KTE the "Open/Save > Modes & Filetypes" configuration tab. In \
> there we can edit indentation settings per language through the variable editor. \
> This nice but this just works globally as far as I can see. In my case I have a \
> global config for C++ but for a specific project I need another indentation \
> settings. I've tried to write my own .kateconfig file in the root of the project., \
> but doing this only updates the indentation settings of all the non-C++ files :/

There is no way at this time to specify per-file type rules in .kateconfig files. I \
would love to see this implemented although I am not sure of the best way.

Can you live with Kate mode lines in your files? You do have to do it for every file \
that the .kateconfig file (or your Kate settings) does not apply to (and they might \
be annoying to other people). If your .kateconfig is the general case (like all C++ \
files), then maybe you only have a few files to add mode lines to? That is generally \
how I handle it. But it is two-fold: have a good default Kate configuration (your \
preferences), and decide on mode lines or .kateconfig for special cases (project \
specific). One project I have dictates tabs (which I hate; applies to almost all \
files), so I use a .kateconfig file for that which even keeps them hidden.

.kateconfig can target a directory too, so you can have a base configuration at root, \
another inside, etc: root/.kateconfig <-- C++ rules
root/scripts/.kateconfig <-- Other language rules?

I know in some files it is not possible to have to a comment for a mode line \
(package.json comes to mind), so for those you have to rely on Kate memorising the \
settings you placed on that specific file path which is at \
~/.kde4/share/apps/kate/metainfos for me.

Andrew
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic