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

Tory Gaurnier tory.gaurnier at xxxxx
Sat Jul 26 01:33:04 UTC 2014

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
>> than the previous line.
>>> Is anybody using this?
>> I doubt it
>>> Under "smart" indentation people assume astyle, php-beautifier and
>so on:
>> Yeah, we know we should have a nice (and complex) system for
>> configurable smart indentation, but every time we tried to think
>> it we discovered that some languages are so crazy that it's really
>> simple, and probably would require some specific code for some
>> (did I say Haskell?).  And nobody did the filetypes plugins yet :(
>> However, you might be able to use some indenters tools from Geany
>> 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,
>> being my lack of much interest in it (I'd rather work on a solution
>> configurable and nice thing for Geany than on wrapping gnuindent,
>> 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
>JS support) by using clang-format. See:
>Matthew Brush
>Devel mailing list
>Devel at lists.geany.org

Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20140725/961c94b6/attachment.html>

More information about the Devel mailing list