On 11 November 2013 10:35, James Brierley <jmb8710@gmail.com> wrote:
Ah, this has reminded me: I forgot to mention, but perhaps it would be possible (for someone) to write a plugin which pipes your code through something such as Uncrustify, which is a modern version of the classic Unix utility ‘cb’. You would still need to hit a button to beautify your code (rather like the XML PrettyPrinter plugin) but at least it might be one way of having configurable indentation without costly on-the-fly parsing.

What about http://www.geany.org/manual/current/index.html#sending-text-through-custom-commands

Ok, you need an extra <ctrl>+a to select all before the keybinding for the command, but two keys isn't too bad :)

BTW do not use astyle for this, it lies through its teeth about working from a piped stdin, it tries to do a seek on the input and thats not possible on pipes.  I havn't done it for ages, but uncrustify used to work.

Cheers
Lex

 

I’d have a go at this myself, but for the fact that I’m a CS graduate student (learning all that new stuff is great but why do they have to give you piles of coursework as well? :P)


James

--
"Unix is the worst computer operating system, except
all the others that have been tried."
_______________________________________________
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users