unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Roodwriter@core.com" <Roodwriter@core.com>
Subject: Re: Movement mode
Date: Wed, 26 May 2004 13:18:46 -0400	[thread overview]
Message-ID: <10b9kef24vhug00@corp.supernews.com> (raw)
In-Reply-To: mailman.7520.1085587913.1061.help-gnu-emacs@gnu.org

Tobias Radloff wrote:

> Hi there,
> 
> I wonder if there is a way to make emacs behave like modern editors like
> kedit and the like, especially when it comes to paragraphs continuing over
> several lines. I'd like to change the behavior of the up and down keys
> (and that of C-P and C-N too, of course) from moving one paragraph up or
> down to moving one line up or down. I would like to change the behavior of
> pos1 and end similarly.
> 
> Since we're talking emacs here, I don't ask if it's possible but rather:
> how do I do it? :)
> 
> 
> Regards
> Tobias


You need auto-fill mode, which breaks the lines as you type along. That'll 
also give you the cursor motion that you're looking for.

Unfortunately, it uses hard carriage returns and won't rebreak them so you 
have to use M-q to put the paragraph into the proper order.

There's also refill-mode, which does the M-qing automatically. It has one 
major drawback: It's greedy. If you do this:

First line
second line
third line

You'll get: First line second line third line.

Because of this I find it easier to write in block style, without tabs. When 
I need tabs (and longlines) I use a macro to convert two carriage returns 
in a row to a carriage return and tab and then delete single carriage 
returns. It's basically just some replace-regexps. First I replace the 
carriage returns with a symbol (I use # because I don't use it otherwise) 
and then the replacements as stated in the beginning of the paragraph.

For writing, don't use the normal text mode but paragraph-indent-text-mode. 
It handles tabs better. But still Emacs' tabbing is better for programmers 
than writers. Tabs can be a problem. So I skip them. The macro I described 
makes it painless to convert to tabbed style.

Yeah, for writing, Emacs method of line-breaking can be a bit of a pain. But 
its wealth of other editing commands more than makes up for this small 
drawback.

--Rod

__________

Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical Consumers" 
and "Boring Stories from Uncle Rod." Both are available at 
http://www.rodwriterpublishing.com/index.html

To reply by e-mail, take the extra "o" out of the name.

       reply	other threads:[~2004-05-26 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7520.1085587913.1061.help-gnu-emacs@gnu.org>
2004-05-26 17:18 ` Roodwriter [this message]
2004-05-26 18:18   ` Movement mode Kevin Rodgers
2004-05-26 16:11 Tobias Radloff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10b9kef24vhug00@corp.supernews.com \
    --to=roodwriter@core.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).