Peace!
Is there a way to automatically format a given source code interactively while typing? As far as I know, it is only possible to enter "if( /tab" to get
if( ) {
}
Is there a way to automatically format "x=x+2;" to "x = x + 2;/n" for easier reading without manually entering spacebars and enter at the end.
Thanks in advance!
p.s I've tried asking in the arch linux forums but doesn't seem to be a direct way to do that.
http://bbs.archlinux.org/viewtopic.php?pid=476758#p476758 http://en.wikipedia.org/wiki/Indent_style
Hmm... I don't get why the /n part is annoying... Isn't it always a given that u press enter right after the semicolon?
I'm rather new at this lol..
Hopefully astyle meets my needs.
On 1/10/09, Thomas Martitz thomas.martitz@fhtw-berlin.de wrote:
onguarde - schrieb:
Is there a way to automatically format "x=x+2;" to "x = x + 2;/n" for easier reading without manually entering spacebars and enter at the end.
Thanks in advance!
That would be seriously annoying, especially the \n part. _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Hi,
On Sat, 10 Jan 2009 07:38:09 +0800 "onguarde -" onguarde@gmail.com wrote:
Hmm... I don't get why the /n part is annoying... Isn't it always a given that u press enter right after the semicolon?
#include <stdio.h>
int main(int argc, char** argv) { printf ("Hello World"); return 0; }
Is also some valid C code.
Thanks, Frank
Ah yes but people usually write that with a newline for easier viewing....
On 1/10/09, Frank Lanitz frank@frank.uvena.de wrote:
Hi,
On Sat, 10 Jan 2009 07:38:09 +0800 "onguarde -" onguarde@gmail.com wrote:
Hmm... I don't get why the /n part is annoying... Isn't it always a given that u press enter right after the semicolon?
#include <stdio.h>
int main(int argc, char** argv) { printf ("Hello World"); return 0; }
Is also some valid C code.
Thanks, Frank -- http://frank.uvena.de/en/
Am 12.01.2009 17:58, schrieb onguarde -:
Ah yes but people usually write that with a newline for easier viewing....
And your loops look like:
for(i = 0; i < MAX_COUNT; i++); {...
?
No seriously. I wouldn't like that. It would be annyoing, and make people even more lazy and careless about their code.
Of course, an exception could be made in the case of text in (...).
Ideally imho, the software should minimize unnecessary effort on the part of the user. I figure why make the user type an extra character when it is possible to deduce it from the context?
Just my 2c.
On 1/13/09, Thomas Martitz thomas.martitz@fhtw-berlin.de wrote:
Am 12.01.2009 17:58, schrieb onguarde -:
Ah yes but people usually write that with a newline for easier viewing....
And your loops look like:
for(i = 0; i < MAX_COUNT; i++); {...
?
No seriously. I wouldn't like that. It would be annyoing, and make people even more lazy and careless about their code. _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Thu, 8 Jan 2009 17:07:05 +0800, "onguarde -" onguarde@gmail.com wrote:
Peace!
Hi.
First of all, this is a mailing list, so please subscribe to get further responses. See http://lists.uvena.de/cgi-bin/mailman/listinfo/geany for details.
Is there a way to automatically format a given source code interactively while typing? As far as I know, it is only possible to enter "if( /tab" to get
if( ) {
}
Is there a way to automatically format "x=x+2;" to "x = x + 2;/n" for easier reading without manually entering spacebars and enter at the end.
Not sure. What you mean with if <TAB> is called 'snippets', see http://geany.org/manual/0.15/#user-definable-snippets. But you always need to trigger these snippets (default by TAB but you can change the key). But real automatic substitution or reformatting is not possible and probably would be too annoying for general use.
Regards, Enrico
Am Donnerstag, den 08.01.2009, 17:07 +0800 schrieb onguarde -:
Is there a way to automatically format "x=x+2;" to "x = x + 2;/n" for easier reading without manually entering spacebars and enter at the end.
I would recommend you to use code beautifying tools like astyle or something else for that. It is possible to call such tools from within Geany.
Regards, Dominic