- Vim - Conclusion
- Vim - Personalization
- Vim - Tips & Tricks
- Vim - Remote File Editing
- Vim - Using Vim as IDE
- Vim - Plug-ins
- Vim - Diff
- Vim - Folding
- Vim - Registers
- Vim - Macros
- Vim - Markers
- Vim - Working With Multiple Things
- Vim - Searching
- Vim - Revisiting Editing
- Vim - Navigating
- Vim - Editing
- Vim - Getting help
- Vim - Getting familiar
- Vim - It’s friends
- Vim - Installation & Configuration
- Vim - Introduction
- Vim - Home
Vim Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Vim - Markers
Vim supports bookmark feature. Using this feature we can make navigation within file really faster. In this chapter, we will discuss following items −
Create bookmark
Jump to bookmark
List all bookmarks
Delete bookmarks
Local bookmarks
Global bookmarks
Create bookmark
To create bookmark execute following command −
m{bookmark-name}
In above example bookmark-name is single alphabetical character. For instance, below command creates bookmark of name a.
ma
Jump to bookmark
Once bookmark is created we can jump there. Following command can be use to jump to bookmark −
Sr.No | Command & Description |
---|---|
1 |
`{bookmark-name}
Move to the exact location of bookmark. Please note that this character is back quote |
2 | ‘{bookmark-name}
Jump to the beginning of bookmark pne. Please note that this character is single quote |
List all bookmarks
To pst all bookmarks execute following command −
:marks
In below image it show pst of bookmarks for current file
Delete bookmark
To delete bookmarks execute following command −
:delmarks {bookmark-name}
For instance, below command delete bookmark with name a.
:delmarks a
Local bookmarks and global bookmarks
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 apppcable for both local and global bookmarks.
Advertisements