[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:       Miquel_Sabaté <mikisabate () gmail ! com>
Date:       2014-11-24 11:04:24
Message-ID: CAJLXPb6S=ke0q50huz2=HJjmQCedJHUg1OOWnp1EAOcNUnRSUQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Andrew,

In "Open/Save > Modes & Filetypes" I have the following for the Filetype
"Sources/C++":

kate: indent-width 4; remove-trailing-spaces modified; replace-tabs false;
tab-indents true; tab-width 4;

Now, for my current project I need an indentation of 2 soft spaces. So I
have in the root of my project a .kateconfig file with the following
contents:

kate: indent-width 2; remove-trailing-spaces modified; replace-tabs true;
tab-indents true; tab-width 2;

As I said, this does not work for neither Kate nor KDevelop. Moreover, the
option "Search depth for config file" that you're saying does not exist
anymore in master ;-)

Greetings,
Miquel


On Mon, Nov 24, 2014 at 11:46 AM, Andrew Udvare <audvare@gmail.com> wrote:

>
> > On 2014-11-24, at 02:33, Miquel Sabat=C3=A9 <mikisabate@gmail.com> wrot=
e:
> >
> > I know that. That's what I tried to accomplish: set a .kateconfig for
> the root of my project with the indentation settings that I wanted. But i=
t
> turned out that the general indentation settings for C++ override any loc=
al
> .kateconfig that I may have :/
>
> I think something could be wrong here. What does your .kateconfig file
> look like? Unless there is a bug to open regarding .kateconfig/mode lines
> and having custom overriding rules for a language (and not global Kate
> settings). Do you have custom rules set for C++? Mode lines and .kateconf=
ig
> should be first priority if I am not mistaken.
>
> I do not have any specific rules for YAML but for one project (Ansible
> playbook, mostly YAML and Jinja2 templates) I set the .kateconfig to use =
2
> spaces instead of 4:
>
> kate: tab-width 2; indent-width 2; replace-tabs on; eol unix
>
> That pro-tab project:
>
> kate: indent-width 4; newline-at-eof true; remove-trailing-spaces all;
> replace-tabs false; replace-tabs-save false; show-tabs false; tab-width 4
>
> Note there's also a setting about how far back Kate will search for a
> .kateconfig. In the settings dialog, under Editor Component -> Open/Save =
->
> Advanced tab. My 'Search depth for config file' is set to 9, but I think =
in
> KDevelop I have it set to 15 or so.
>
> Andrew
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
>

[Attachment #5 (text/html)]

<div dir="ltr">Hi Andrew,<div><br></div><div>In &quot;Open/Save &gt; Modes &amp; \
Filetypes&quot; I have the following for the Filetype \
&quot;Sources/C++&quot;:</div><div><br></div><div>kate: indent-width 4; \
remove-trailing-spaces modified; replace-tabs false; tab-indents true; tab-width \
4;<br></div><div><br></div><div>Now, for my current project I need an indentation of \
2 soft spaces. So I have in the root of my project a .kateconfig file with the \
following contents:</div><div><br></div><div><div>kate: indent-width 2; \
remove-trailing-spaces modified; replace-tabs true; tab-indents true; tab-width \
2;</div></div><div><br></div><div>As I said, this does not work for neither Kate nor \
KDevelop. Moreover, the option &quot;<span \
style="font-family:arial,sans-serif;font-size:13px">Search depth for config \
file&quot; that you&#39;re saying does not exist anymore in master \
;-)</span></div><div><span \
style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span \
style="font-family:arial,sans-serif;font-size:13px">Greetings,</span></div><div><span \
style="font-family:arial,sans-serif;font-size:13px">Miquel</span></div><div><br></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 24, 2014 at 11:46 AM, \
Andrew Udvare <span dir="ltr">&lt;<a href="mailto:audvare@gmail.com" \
target="_blank">audvare@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><br>
 &gt; On 2014-11-24, at 02:33, Miquel Sabaté &lt;<a \
href="mailto:mikisabate@gmail.com" target="_blank">mikisabate@gmail.com</a>&gt; \
wrote:<br> &gt;<br>
&gt; I know that. That&#39;s what I tried to accomplish: set a .kateconfig for the \
root of my project with the indentation settings that I wanted. But it turned out \
that the general indentation settings for C++ override any local .kateconfig that I \
may have :/<br> <br>
</span>I think something could be wrong here. What does your .kateconfig file look \
like? Unless there is a bug to open regarding .kateconfig/mode lines and having \
custom overriding rules for a language (and not global Kate settings). Do you have \
custom rules set for C++? Mode lines and .kateconfig should be first priority if I am \
not mistaken.<br> <br>
I do not have any specific rules for YAML but for one project (Ansible playbook, \
mostly YAML and Jinja2 templates) I set the .kateconfig to use 2 spaces instead of \
4:<br> <br>
kate: tab-width 2; indent-width 2; replace-tabs on; eol unix<br>
<br>
That pro-tab project:<br>
<br>
kate: indent-width 4; newline-at-eof true; remove-trailing-spaces all; replace-tabs \
false; replace-tabs-save false; show-tabs false; tab-width 4<br> <br>
Note there&#39;s also a setting about how far back Kate will search for a \
.kateconfig. In the settings dialog, under Editor Component -&gt; Open/Save -&gt; \
Advanced tab. My &#39;Search depth for config file&#39; is set to 9, but I think in \
KDevelop I have it set to 15 or so.<br> <div><div><br>
Andrew<br>
_______________________________________________<br>
KWrite-Devel mailing list<br>
<a href="mailto:KWrite-Devel@kde.org" target="_blank">KWrite-Devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> \
</div></div></blockquote></div><br></div></div>



_______________________________________________
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