[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: making TAB in text major mode just work
From: |
Giorgos Keramidas |
Subject: |
Re: making TAB in text major mode just work |
Date: |
Fri, 23 Nov 2007 04:30:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (berkeley-unix) |
On Thu, 22 Nov 2007 12:35:12 -0800 (PST), jwithers <jpwithers@gmail.com> wrote:
> Folks,
>
> In text mode, or in fundamental mode for that matter, if emacs decides
> you are indenting to some point before a tab stop, it helpfully
> decides that you want that indent on following lines. This is a real
> pita when you are doing bullet points, as follows:
>
> |<-----the first tab stop
> * This is a bullet point
> * This is another bullet point
>
> This is a paragraph that is now indented incorrectly because emacs
> has decided that my bullet points mean this line should be indented
> two spaces.
>
> I am looking for some way to stop this behavior, so that emacs doesn't
> decide I need smart indentation, [...]
You can bind TAB to `self-insert-command'. This should do it.
One way of setting this for `text-mode' and its derivatives is:
(add-hook 'text-mode-hook
(lambda ()
(local-set-key (kbd "TAB") 'self-insert-command)))
> And doing a control-q tab isn't really good in my mind. I don't want
> to have to keep remembering to do something different than just type
> when I am in the flow of working.
TAB is equivalent to `C-i' in many terminals. You can quickly insert a
literal ASCII TAB character by hitting `M-i', or you can use the hook
change shown above... it's all a matter of preference :)
- Giorgos