[Noisebridge-discuss] vim question

Seth David Schoen schoen at loyalty.org
Tue Oct 9 00:23:47 UTC 2012


Frantisek Apfelbeck writes:

> Hi to all,
> I have a vim related question. I'm reading an e-book in vim (lovely green text on the black background) but I have a problem to remember where did I finished last when I want to continue reading. I know that I can make a kind of "mark word" and search for it but I wonder if I could somehow make vim start on the line where I finished (where the cursor was last). Do you think it is possible and if so how?
> 
> I know it is kind very lazy question but it would be so comfortable ...

One thing to know about are the m and ' commands.  In the most basic
form, you use m followed by a letter to set a mark (named with that
letter) at the current location, and then ' followed by that letter to
navigate back to that location (including, if you choose, as a cursor
movement combined with another action).

For example, ma to set mark "a" and then 'a to navigate to mark "a".

You can also use '' to go back to where you were before the most recent
' command, so you can use repeated '' commands to jump back and forth
between two spots in a document.

-- 
Seth David Schoen <schoen at loyalty.org>      |  No haiku patents
     http://www.loyalty.org/~schoen/        |  means I've no incentive to
  FD9A6AA28193A9F03D4BF4ADC11B36DC9C7DD150  |        -- Don Marti



More information about the Noisebridge-discuss mailing list