Hello. As time goes by, I have learned slime features one by one. But
shamely, I still can't find a command of making a block of code
indented properly. When I copied a function of ten line code which has
no indentation, I have to hit 'tab' key 10 times. Is there a command
which make a block of code properly indented by just one command in
the code block? Thanks in advance.
Le Tue, 4 Nov 2008 18:09:18 -0800 (PST),
···········@gmail.com a écrit :
> Hello. As time goes by, I have learned slime features one by one. But
> shamely, I still can't find a command of making a block of code
> indented properly. When I copied a function of ten line code which has
> no indentation, I have to hit 'tab' key 10 times. Is there a command
> which make a block of code properly indented by just one command in
> the code block? Thanks in advance.
After you selected region (block) to indent, use "C-M-\" or call
"indent-region" via "M-x".
--
jacques
On 11월5일, 오전11시23분, Kojak <·······@janville.Borg.invalid> wrote:
> Le Tue, 4 Nov 2008 18:09:18 -0800 (PST),
> ···········@gmail.com a écrit :
>
> > Hello. As time goes by, I have learned slime features one by one. But
> > shamely, I still can't find a command of making a block of code
> > indented properly. When I copied a function of ten line code which has
> > no indentation, I have to hit 'tab' key 10 times. Is there a command
> > which make a block of code properly indented by just one command in
> > the code block? Thanks in advance.
>
> After you selected region (block) to indent, use "C-M-\" or call
> "indent-region" via "M-x".
>
> --
> jacques
Thanks a lot! :) This is exteremly useful! Happy Lisping~
On Nov 4, 9:23 pm, Kojak <·······@janville.Borg.invalid> wrote:
> Le Tue, 4 Nov 2008 18:09:18 -0800 (PST),
> ···········@gmail.com a écrit :
>
> > Hello. As time goes by, I have learned slime features one by one. But
> > shamely, I still can't find a command of making a block of code
> > indented properly. When I copied a function of ten line code which has
> > no indentation, I have to hit 'tab' key 10 times. Is there a command
> > which make a block of code properly indented by just one command in
> > the code block? Thanks in advance.
>
> After you selected region (block) to indent, use "C-M-\" or call
> "indent-region" via "M-x".
>
> --
> jacques
You can also use indent-sexp (typically bound to C-M-q) when you're at
the beginning of an expression. You don't have to mark the region with
this command.
//JT
From: Tobias C. Rittweiler
Subject: Re: A trivial question about slime command
Date:
Message-ID: <87wsfichce.fsf@freebits.de>
············@gmail.com" <···········@gmail.com> writes:
> Hello. As time goes by, I have learned slime features one by one. But
> shamely, I still can't find a command of making a block of code
> indented properly. When I copied a function of ten line code which has
> no indentation, I have to hit 'tab' key 10 times. Is there a command
> which make a block of code properly indented by just one command in
> the code block? Thanks in advance.
If you use the `slime-editing-commands' contrib, you can use C-c M-q
which reindents the toplevel form that you're currently in.
-T.