Thursday, December 15, 2011

Re: 'Composite' filter command in function

On Dec 14, 8:55 pm, John Little <john.b.lit...@gmail.com> wrote:
> BPJ asked:
>
> > How do I do to get back to (roughly) the same line in
> > the file as I was on after executing a filter command
> > on the whole file?
>
> Paul answered:
>
> > ctrl-i and ctrl-o will take you through the jump list.
>
> But you may have to first use m' to ensure the current position is in
> the jumplist.  So
> m'
> :%!whatever
> ctrl-o
>

After some experimentation, I like this best:

m'
:%!whatever
''

(why use CTRL-O for a single jump to the ' mark?)

Note you could also use any of the a-z marks instead of '.

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