help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Free cursor positioning.


From: Marko Vojinovic
Subject: Re: Free cursor positioning.
Date: Fri, 5 Aug 2011 21:15:19 +0100
User-agent: KMail/1.13.7 (Linux/2.6.35.13-92.fc14.x86_64; KDE/4.6.5; x86_64; ; )

On Friday 05 August 2011 16:40:47 Drew Adams wrote:
> > Some user ask me how configure Emacs to move cursor in any position
> > like this done in editor of Far file manager.
> > 
> > So if you press RIGHT at the end of string cursor move right
> > not to next
> > string and so on. If you type any char after the end of line
> > editor automatically add spaces from the end of line up to
> > inserted new
> > char.
> 
> Sorry, I'm not sure what you're asking, or even whether you're asking a
> question.

I believe that the OP wants the point (ie. cursor) to maintain the column 
position when switching lines, regardless of the position of the end-of-line 
character. I've seen this behavior in some editors. For example, suppose you 
have the following two lines in the buffer (<eoln> is indicating end-of-line):

This is the first line of text. It is very long, but does not wrap.<eoln>
The second line is short.<eoln>

Then suppose you go with the point to the letter "p" at the end of the first 
sentence (line 1, column 65), and press the down arrow to move the point to 
the second line. By default the point is placed at the end of the second line 
(line 2, column 25). What the OP wants is the point to be at line 2, column 
65, and if he types something there, the editor should fill in the spaces 
between the . and the <eoln> of the second line, to make it long enough for 
the next character to be placed where the point is, at (2,65).

In other words, ignore the position of <eoln> when moving the point around, 
and add spaces where ever necessary to allow for completely free cursor motion 
in the buffer region. Then, when saving the file, automatically trim trailing 
spaces of each line.

While I don't like this kind of behavior, it is quite common and has some 
advantages, so I guess the OP is used to it. ;-) Unfortunately, I am an Emacs 
beginner, and don't know how to configure it to behave this way.

HTH, :-)
Marko





reply via email to

[Prev in Thread] Current Thread [Next in Thread]