[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Advanced indent
From: Dominik Haumann <dhaumann () kde ! org>
Date: 2012-01-29 15:17:12
Message-ID: 2535873.RkJP7C4hyH () eriador
[Download RAW message or body]
On Sunday, 29. January 2012 16:24:20 Marta Rybczynska wrote:
> I have the following use-case: in one Kate session I have multiple files
> from multiple projects, each with its own ident rules. Switch between
> different projects requires indent change in Kate and is not very
> practical.
>
> Now, modelines are not an option (big, opensource projects),
Maybe you do not want to hear this, but the purpose of modelines
is /exactly/ this... :-)
> .kateconfig may be. However, I can see some issues:
> * different file types require different indent (some strongly, like
> Makefile) * there doesn't seem to be a way to create the .kateconfig file
> directly from Kate settings, by not writing them manually
>
> Is there anyone working on the subject? If not I'm going to implement
> something here, because I do have a real need :)
We have a bug report for mimetype/filetype dependent .kateconfig files.
But noone ever got around to think about a good solution.
You can configure different indentation settings for different file types.
To this end, open the settings dialog, go to "Open/Save", choose the
"Modes&Filetypes" tab, choose the Filetype, and then fill in the
corresponding varialbes in the "Variables:" line edit. These entries are
then the default modeline.
If you have >= KDE 4.8.0, there is another solution you can use: Create a
javascript, and use document.setVariable(key, value) and bind this function
to a shortcut (you have to press it in each document):
http://docs.kde.org/development/en/kde-baseapps/kate/advanced-editing-tools-scripting.html
Greetings,
Dominik
_______________________________________________
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