Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I was wondering how to set a position in my source code, so vi can remember this position, and by hit some key(s) I can come back to that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Posts
    18

    set a position to come back in vi


    Hi,

    I was wondering how to set a position in my source code, so vi can remember this position, and by hit some key(s) I can come back to that position.

  2. #2
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    Use marks, especially the uppercase ones. That is: you set a mark in normal mode by typing, for example: mM (to set mark M), and you return to that mark with 'M . Quite handy, isn't it? As far as I rember these marks are saved betweenvarious Vim executions.
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

  3. #3
    Just Joined!
    Join Date
    Sep 2004
    Posts
    18

    what do you mean normal mode?

    I tried insert mode, it cannot work. what do you mean normal mode?

  4. #4
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    Just press escape to get into normal mode.
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •