[Geany-Devel] Why smart indentation is so stupid?

Steven Blatnick steve8track at xxxxx
Mon Jul 28 15:18:27 UTC 2014

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?

On 07/25/2014 07:33 PM, Tory Gaurnier wrote:
> 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.
> On July 25, 2014 3:28:21 PM PDT, Matthew Brush <mbrush at codebrainz.ca> 
> wrote:
>     On 14-07-25 01:01 PM, Colomban Wendling wrote:
>         Le 25/07/2014 21:33, Pavel Roschin a écrit :
>             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". 
>         It's a lie, this feature isn't smart, it just sets the same
>         indentation than the previous line.
>             Is anybody using this? 
>         I doubt it
>             Under "smart" indentation people assume astyle,
>             php-beautifier and so on:
>             http://stackoverflow.com/questions/18828162/smart-auto-indentation-available-in-geany
>         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:
>         https://github.com/b4n/grind
>     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:
>     http://codebrainz.github.io/code-format/
>     Cheers,
>     Matthew Brush
>     ------------------------------------------------------------------------
>     Devel mailing list
>     Devel at lists.geany.org
>     https://lists.geany.org/cgi-bin/mailman/listinfo/devel
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20140728/5047a72e/attachment.html>

More information about the Devel mailing list