Vim supports bookmark feature. Using this feature we can make navigation within file really faster. In this chapter, we will discuss following items −
To create bookmark execute following command −
In above example bookmark-name is single alphabetical character. For instance, below command creates bookmark of name a.
Once bookmark is created we can jump there. Following command can be use to jump to bookmark −
|Sr.No||Command & Description|
Move to the exact location of bookmark. Please note that this character is back quote
Jump to the beginning of bookmark line. Please note that this character is single quote
To list all bookmarks execute following command −
In below image it show list of bookmarks for current file
To delete bookmarks execute following command −
For instance, below command delete bookmark with name a.
When you have multiple files open and if you want to go to a particular position in any one of the open files, then you can use global mark feature of Vim.
If the bookmark name is an upper case letter, then that is a global Bookmark. Above discussed commands are applicable for both local and global bookmarks.