Thursday, December 30, 2010

Re: Line-based jumplist?

On 12/30/2010 08:54 AM, Douglas A. Augusto wrote:
> Hi,
>
> Is there a way to return to a previous position (character) on the current line
> after a jump to any other position on the *same* line? Suppose the cursor is at
> some position on the line:
>
> The quick brown fox jumps over the lazy dog
> ^
> (cursor)
>
> Then $ is pressed, putting the cursor at the EOL:
>
> The quick brown fox jumps over the lazy dog
> ^
> (cursor)
>
> Now, how do I return, i.e. jump back, to the previous location (character 'r')
> on the line?
>
> If I had made changes at 'r' I could use 'g;' to return to it, but I'm asking
> about the more general case where no changes were made at the original position.
>
> Thank you.
>


Not sure about jumping to exact spot but I made a plugin
that jumps to 25%, 50% and 75% of text of current line (i.e.
it discards leading & trailing whitespace). I can share if
anyone's interested. I find it's usually close enough
that I can use w/b or W/B keys or f/F to get where I need.
-ak

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment