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.
A mark allows you to record your current position so you can return to it later. There is no visible indication of where marks are set. Each file has a set of marks identified by lowercase letters (a-z).
viminfo contains histories and marks, if you don't want them any more, you can delete this file. Vim will recreate it next time. This does not clear marks on "<> and ' . The first three are removed via delm \"<> .
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
source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With