all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Need a simple text mode
@ 2006-12-06  7:12 hemant
  0 siblings, 0 replies; 2+ messages in thread
From: hemant @ 2006-12-06  7:12 UTC (permalink / raw)


Hi,

I wanted a simple text mode, in which all the newlines should be
started at the previous indentation level and If i want to change the
indentation level from any given line I would press <TAB> key, which
would insert 2 spaces from the current indentation level and indent
the line.


Many would claim, this is already the behaviour, but its not so. If I
press TAB sometimes I get indentation width of 2 or 4 or 8 spaces.
Even though I have set tab-stop variable to:

2 4 6 8 10 ....

So for setting up uniform indentation of 2 spaces in text mode, I did:

(define-key text-mode-map [tab] (lambda
                                 () (interactive) (insert "  ")))

I guess, you would agree this is not the solution.

Any help?


-- 
There was only one Road; that it was like a great river: its springs
were at every doorstep, and every path was its tributary.

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

* Re: Need a simple text mode
       [not found] <mailman.1590.1165389192.2155.help-gnu-emacs@gnu.org>
@ 2006-12-06 17:46 ` roodwriter
  0 siblings, 0 replies; 2+ messages in thread
From: roodwriter @ 2006-12-06 17:46 UTC (permalink / raw)


hemant <gethemant@gmail.com> writes:

> Hi,
> 
> I wanted a simple text mode, in which all the newlines should be
> started at the previous indentation level and If i want to change the
> indentation level from any given line I would press <TAB> key, which
> would insert 2 spaces from the current indentation level and indent
> the line.
> 
> 
> Many would claim, this is already the behaviour, but its not so. If I
> press TAB sometimes I get indentation width of 2 or 4 or 8 spaces.
> Even though I have set tab-stop variable to:
> 
> 2 4 6 8 10 ....
> 
> So for setting up uniform indentation of 2 spaces in text mode, I did:
> 
> (define-key text-mode-map [tab] (lambda
>                                  () (interactive) (insert "  ")))
> 
> I guess, you would agree this is not the solution.
> 
> Any help?
> 
> 
> -- 
> There was only one Road; that it was like a great river: its springs
> were at every doorstep, and every path was its tributary.
> 
> 

You can get a text tab with M-i, C-q C-i or C-q tab. Not convenient, I
know, but the default tab is apparently set for programmers, not
writers, who like variable indents. You, of course, can define your
tab any way you like.

I one time tried changing the keybinding on my tab key to M-i but
found that some commands (maybe some macros, don't remember) then
wouldn't work correctly.

Your tabs will work the way you think they will if you write things
unfilled, since the tab takes its cue from the first word in the
previous line. But writing unfilled isn't as nice for most of us.

Another way, which I favor, is to write only in block paragraphs,
which is what you're seeing here, and use longlines.el. It's nothing
to set up a permanent macro to convert the empty newline (or two
newlines in a row) to a tab when you're done. I find writing without
tabs faster and you're less prone to accidentally hitting the caps
lock AND GETTING A LOT OF TEXT LIKE THIS.

If you want the full tabbed-paragraph experience, though, use
longlines.el with M-x paragraph-indent-text-mode. You'll still have to
M-i etc. though.

Hope this was what you were looking for.

--Rod
______________________
Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical
Consumers" and "Boring Stories from Uncle Rod." To reply by e-mail
take the second "o" out of the e-mail address.

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

end of thread, other threads:[~2006-12-06 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-06  7:12 Need a simple text mode hemant
     [not found] <mailman.1590.1165389192.2155.help-gnu-emacs@gnu.org>
2006-12-06 17:46 ` roodwriter

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.