[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line-move-visual
From: |
Pascal J. Bourguignon |
Subject: |
Re: line-move-visual |
Date: |
Wed, 08 Dec 2010 15:13:54 -0000 |
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/23.2 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> principal way of working, rather than in special cases in some obscure
>>> feature (keyboard macros).
>> Keyboard macros are far from obscure.
>
> Indeed.
>
>>> And it was dashed near impossible to move easily to the middle of
>>> long, long lines.
>> C-u <some number> right-arrow
>
> How convenient!
> Say you're in a window and want to go down 3 visual lines on the same
> long logical line. What number do you use? Ok, let's make it easier
> and say that you happen to know that the window is 76-chars wide.
> So 76 by 3? quick? quick?
240. You can refine later.
> Now let's do that again but with 13 lines, where you don't actually know
> it's "13": you first have to count it.
Let's say you can't even count the lines!
You can always, and only with emacs, type:
M-: (forward-char (/ (- (progn (end-of-line) (point)) (progn
(beginning-of-line) (point))) 2)) RET
> The best I could come up with, is C-76 C-f and then C-x z z z ... until
> you reach the line.
> Now this all becomes a lot more interesting once you add word-wrap into
> the mix, or TABs, or bytes displayed \NNN, or the presence of various
> fonts and/or font-sizes on that long line, or variable-pitch fonts, ...
Well, C-f C-n is all you need. I mean, keep C-f pressed until the
cursor reaches the column you want, you don't even need to count
76. And keep C-n pressed until the cursor reaches the line you want.
> Stefan "who reached for the mouse in all those cases, tho
> typically only after first unconsciously hitting C-n
> a few times and then realizing that C-n jumped way
> further than intended"
WFM. So far.
--
__Pascal Bourguignon__ http://www.informatimago.com/
- Re: line-move-visual, (continued)
- Re: line-move-visual, Mark Crispin, 2010/12/09
- Re: line-move-visual, Alan Mackenzie, 2010/12/08
- Re: line-move-visual, Jim Diamond, 2010/12/08
- Re: line-move-visual, Uday S Reddy, 2010/12/08
- Re: line-move-visual, Alan Mackenzie, 2010/12/08
- Re: line-move-visual, Uday S Reddy, 2010/12/08
- Re: line-move-visual, Tim X, 2010/12/08
- Re: line-move-visual, Stefan Monnier, 2010/12/08
- Message not available
- Re: line-move-visual, Stefan Monnier, 2010/12/08
- Re: line-move-visual, Patrick May, 2010/12/09
- Message not available
- Re: line-move-visual,
Pascal J. Bourguignon <=
- Re: line-move-visual, Uday S Reddy, 2010/12/08
- Re: line-move-visual, David Kastrup, 2010/12/08
- Re: line-move-visual, Tim X, 2010/12/08
- Re: line-move-visual, Stefan Monnier, 2010/12/08
- Re: line-move-visual, Uday S Reddy, 2010/12/08
- Message not available
- Re: line-move-visual, Leo, 2010/12/08
- Message not available
- Re: Emacs language, Leo, 2010/12/08
- Re: Emacs language, Teemu Likonen, 2010/12/08
- Message not available
- Re: line-move-visual, Uday S Reddy, 2010/12/08
- Re: line-move-visual, Alan Mackenzie, 2010/12/08