[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indenting paragraphs manually
From: |
Dani Moncayo |
Subject: |
Re: Indenting paragraphs manually |
Date: |
Sun, 6 Mar 2011 21:57:20 +0100 |
On Sun, Mar 6, 2011 at 21:26, Drew Adams <drew.adams@oracle.com> wrote:
>> > You can type "C-x TAB" once and then repeat it with "C-x z".
>>
>> Indeed, that is another solution, but IMO has it's own drawbacks:
>> - As shown, the indentation is made by steps of 1 space.
>> - If you use a prefix argument (to avoid the above problem), it
>> becomes cumbersome.
>>
>> The complexity of this method is also higher than having a simple,
>> easy to type command that indents the region to the next tab stop and
>> can be repeated several times in a row.
>
> (defun incremental-tab (arg)
> (interactive "P")
> (require 'repeat)
> (let ((repeat-message-function 'ignore))
> (setq last-repeatable-command 'indent-rigidly)
> (repeat nil)))
>
> (define-key ctl-x-map "\t" 'incremental-tab)
>
> Or if `C-x TAB TAB...' is too much for you, hold down `f5':
>
> (global-set-key [f5] 'incremental-tab)
>
> Hit `C--' at any time to reverse, `C-1' to reverse back again:
>
> `f5 f5 f5 f5 C-- f5 f5 C-1 f5'...
>
>
Thanks, Drew! (I have to find the time to learn elisp... :) )
You've implemented a solution for this problem, but what do you think
about my original question in this thread, i.e., the behavior of the
<TAB> key in text mode, in the current Emacs trunk? Do you understand
it? Does the manual describes it well?
--
Dani Moncayo
- Re: Indenting paragraphs manually, (continued)
I filed two bug reports (was: Re: Indenting paragraphs manually), Gregor Zattler, 2011/03/06
Message not available
- Re: Indenting paragraphs manually, Uday Reddy, 2011/03/06
- Re: Indenting paragraphs manually, Dani Moncayo, 2011/03/06
- RE: Indenting paragraphs manually, Drew Adams, 2011/03/06
- Re: Indenting paragraphs manually, Teemu Likonen, 2011/03/06
- Re: Indenting paragraphs manually, Dani Moncayo, 2011/03/06
- RE: Indenting paragraphs manually, Drew Adams, 2011/03/06
- Re: Indenting paragraphs manually,
Dani Moncayo <=
- RE: Indenting paragraphs manually, Drew Adams, 2011/03/06
- Re: Indenting paragraphs manually, Perry Smith, 2011/03/07
- RE: Indenting paragraphs manually, Drew Adams, 2011/03/07
Re: Indenting paragraphs manually, Teemu Likonen, 2011/03/06
Re: Indenting paragraphs manually, Teemu Likonen, 2011/03/07
Re: Indenting paragraphs manually, Le Wang, 2011/03/07
Re: Indenting paragraphs manually, Le Wang, 2011/03/07
Re: Indenting paragraphs manually, Teemu Likonen, 2011/03/07
RE: Indenting paragraphs manually, Drew Adams, 2011/03/07
RE: Indenting paragraphs manually, Drew Adams, 2011/03/07