unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Automatic code formatting?
@ 2014-08-16  4:28 Bernardo Ezequiel Contreras
  2014-08-16  5:13 ` Nala Ginrut
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bernardo Ezequiel Contreras @ 2014-08-16  4:28 UTC (permalink / raw)
  To: Guile User

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

hi all,
  i would like to know how do you automatically format your code?
  cause i have no idea, and i don't want to do it manually.
  is there a emacs mode, command or something for that?


thanks in advance

-- 
Bernardo E.C.

Sent from a cheap desktop computer in South America.

[-- Attachment #2: Type: text/html, Size: 513 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Automatic code formatting?
  2014-08-16  4:28 Automatic code formatting? Bernardo Ezequiel Contreras
@ 2014-08-16  5:13 ` Nala Ginrut
  2014-08-16  8:13 ` J Kalbhenn
  2014-08-16 12:16 ` Taylan Ulrich Bayirli/Kammer
  2 siblings, 0 replies; 5+ messages in thread
From: Nala Ginrut @ 2014-08-16  5:13 UTC (permalink / raw)
  To: Bernardo Ezequiel Contreras; +Cc: Guile User

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

scheme-mode is enough, I always use it.
2014年8月16日 下午12:28于 "Bernardo Ezequiel Contreras" <vonbecmann@gmail.com>写道:

> hi all,
>   i would like to know how do you automatically format your code?
>   cause i have no idea, and i don't want to do it manually.
>   is there a emacs mode, command or something for that?
>
>
> thanks in advance
>
> --
> Bernardo E.C.
>
> Sent from a cheap desktop computer in South America.
>

[-- Attachment #2: Type: text/html, Size: 897 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Automatic code formatting?
  2014-08-16  4:28 Automatic code formatting? Bernardo Ezequiel Contreras
  2014-08-16  5:13 ` Nala Ginrut
@ 2014-08-16  8:13 ` J Kalbhenn
  2014-08-16 12:16 ` Taylan Ulrich Bayirli/Kammer
  2 siblings, 0 replies; 5+ messages in thread
From: J Kalbhenn @ 2014-08-16  8:13 UTC (permalink / raw)
  To: guile-user

i use and maintain a formatter which formats like explained here:
http://sph.io/content/1dd7
it provides a command-line program which i have bound in emacs to a key
for on-demand formatting.

On 2014-08-16 06:28, Bernardo Ezequiel Contreras wrote:
> hi all,
>   i would like to know how do you automatically format your code?
>   cause i have no idea, and i don't want to do it manually.
>   is there a emacs mode, command or something for that?
> 
> 
> thanks in advance
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Automatic code formatting?
  2014-08-16  4:28 Automatic code formatting? Bernardo Ezequiel Contreras
  2014-08-16  5:13 ` Nala Ginrut
  2014-08-16  8:13 ` J Kalbhenn
@ 2014-08-16 12:16 ` Taylan Ulrich Bayirli/Kammer
  2014-08-16 12:50   ` Marko Rauhamaa
  2 siblings, 1 reply; 5+ messages in thread
From: Taylan Ulrich Bayirli/Kammer @ 2014-08-16 12:16 UTC (permalink / raw)
  To: Bernardo Ezequiel Contreras; +Cc: Guile User

Bernardo Ezequiel Contreras <vonbecmann@gmail.com> writes:

> hi all,
> i would like to know how do you automatically format your code?
> cause i have no idea, and i don't want to do it manually.
> is there a emacs mode, command or something for that?
>
> thanks in advance

In Emacs, scheme-mode with Paredit (or SmartParens I guess), using C-j
for newlines instead of RET, using 'fill-column-indicator' AKA
'fci-mode', and/or 'auto-fill-mode' to keep me wary of the column limit,
using M-; to insert comments.  Paragraphs of comments and other plain
text can be formatted with M-q to conform to the column limit.

Taylan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Automatic code formatting?
  2014-08-16 12:16 ` Taylan Ulrich Bayirli/Kammer
@ 2014-08-16 12:50   ` Marko Rauhamaa
  0 siblings, 0 replies; 5+ messages in thread
From: Marko Rauhamaa @ 2014-08-16 12:50 UTC (permalink / raw)
  To: Taylan Ulrich Bayirli/Kammer; +Cc: Guile User

Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>:

> Bernardo Ezequiel Contreras <vonbecmann@gmail.com> writes:
>
>> i would like to know how do you automatically format your code? cause
>> i have no idea, and i don't want to do it manually. is there a emacs
>> mode, command or something for that?
>
> In Emacs, scheme-mode with Paredit (or SmartParens I guess), using C-j
> for newlines instead of RET, using 'fill-column-indicator' AKA
> 'fci-mode', and/or 'auto-fill-mode' to keep me wary of the column
> limit, using M-; to insert comments. Paragraphs of comments and other
> plain text can be formatted with M-q to conform to the column limit.

Emacs does everything out of the box. If you open a scheme file, TAB
indents the line "correctly" and C-M-\ reindents a region of code.

If you don't like the builtin style, you can customize it to your
heart's content.


Marko



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-16 12:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-16  4:28 Automatic code formatting? Bernardo Ezequiel Contreras
2014-08-16  5:13 ` Nala Ginrut
2014-08-16  8:13 ` J Kalbhenn
2014-08-16 12:16 ` Taylan Ulrich Bayirli/Kammer
2014-08-16 12:50   ` Marko Rauhamaa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).