How you can set a bookmark in vim? I want to bookmark some lines and functions. How do you make a bookmark on the code? My code is written in C.
If you type ma
, it will create bookmark on the current line at the current location with name a
.
for example, typing ma
has created a bookmark at the exact location where the cursor is highlighted
To Access Bookmarked Line Inside Vi you can use - {macro-name}
backtick followed by the macro name. Move to the exact bookmark location. This will jump to the exact character location within the line from where it was bookmarked earlier.
For example, if you type `a , it will take you to the bookmark with name “a”. i.e It will take you to the place where the cursor is high-lighted in the above Fig 1.
`a