unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Movement mode
@ 2004-05-26 16:11 Tobias Radloff
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Radloff @ 2004-05-26 16:11 UTC (permalink / raw)


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

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

* Re: Movement mode
       [not found] <mailman.7520.1085587913.1061.help-gnu-emacs@gnu.org>
@ 2004-05-26 17:18 ` Roodwriter
  2004-05-26 18:18   ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: Roodwriter @ 2004-05-26 17:18 UTC (permalink / raw)


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.

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

* Re: Movement mode
  2004-05-26 17:18 ` Roodwriter
@ 2004-05-26 18:18   ` Kevin Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2004-05-26 18:18 UTC (permalink / raw)


Roodwriter@core.com wrote:

> 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.

Or http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el

-- 
Kevin Rodgers

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

end of thread, other threads:[~2004-05-26 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-26 16:11 Movement mode Tobias Radloff
     [not found] <mailman.7520.1085587913.1061.help-gnu-emacs@gnu.org>
2004-05-26 17:18 ` Roodwriter
2004-05-26 18:18   ` Kevin Rodgers

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).