<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I agree that I like "smart indentation", although it does seem to do
one thing that I didn't expect: auto-indent and unindent on curly
braces. I'm more used to just preserving the previous line's
indentation without special casing curly braces. Anybody know if
there is a way to just get flat indentation without this special
case?<br>
<br>
<div class="moz-cite-prefix">On 07/25/2014 07:33 PM, Tory Gaurnier
wrote:<br>
</div>
<blockquote
cite="mid:97660f6b-70e5-40e6-b5bb-e4da44aedd77@email.android.com"
type="cite">I use the "smart indentation" feature and I think it
works fine the way it is. It may not be perfect, but in most cases
it does exactly what it's supposed to. <br>
<br>
<div class="gmail_quote">On July 25, 2014 3:28:21 PM PDT, Matthew
Brush <a class="moz-txt-link-rfc2396E" href="mailto:mbrush@codebrainz.ca"><mbrush@codebrainz.ca></a> wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<pre class="k9mail">On 14-07-25 01:01 PM, Colomban Wendling wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Le 25/07/2014 21:33, Pavel Roschin a écrit :
<blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> I'm very wondered how does "smart indentation" feature work. If previous line
is empty, it removes indent assuming that single empty line is an empty indent.
Smart indentation for multiple lines is absolutely awful: it doesn't take into
account internal sub-indents and makes selection "flat".
</blockquote>
It's a lie, this feature isn't smart, it just sets the same indentation
than the previous line.
<blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> Is anybody using this?
</blockquote>
I doubt it
<blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> Under "smart" indentation people assume astyle, php-beautifier and so on:
<a moz-do-not-send="true" href="http://stackoverflow.com/questions/18828162/smart-auto-indentation-available-in-geany">http://stackoverflow.com/questions/18828162/smart-auto-indentation-available-in-geany</a>
</blockquote>
Yeah, we know we should have a nice (and complex) system for
configurable smart indentation, but every time we tried to think about
it we discovered that some languages are so crazy that it's really not
simple, and probably would require some specific code for some languages
(did I say Haskell?). And nobody did the filetypes plugins yet :(
However, you might be able to use some indenters tools from Geany using
custom commands to some extent. In a similar way, I once started a
multi-indernters plugin, but I didn't finish it for various reasons, one
being my lack of much interest in it (I'd rather work on a solution for
configurable and nice thing for Geany than on wrapping gnuindent, astyle
or others, tools I never really used).
If anyone is interested, it's here: <a moz-do-not-send="true" href="https://github.com/b4n/grind">https://github.com/b4n/grind</a></blockquote>
And for "smart" indentation/formatting, I have written a plugin which
works with C, C++, Objective-C (and I think I remember they talked about
JS support) by using clang-format. See:
<a moz-do-not-send="true" href="http://codebrainz.github.io/code-format">http://codebrainz.github.io/code-format</a>/
Cheers,
Matthew Brush
<hr>
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.geany.org">Devel@lists.geany.org</a>
<a moz-do-not-send="true" href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
</blockquote>
</div>
<br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my
brevity.
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.geany.org">Devel@lists.geany.org</a>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
</blockquote>
<br>
</body>
</html>