Vim practice manual (6) shortcut keys for common search and bookmarking operations
- Author: poechant
- Blog: blog.csdn.net/poechant
- Email: zhongchao. USTC # gmail.com (#-> @)
- Date: January 27Th, 2012
- Update: February 27Th, 2012
1. Search for strings
/string
Search down the string "string"
?string
Search for the string "string"
2. Repeat the previous search
n
Locate the next matched string based on the previous Search Condition
N
Locate the last matched string based on the previous search criteria
3. Search for words
*
Search for words at the cursor position (exact match)
#
Search for words at the cursor position (exact match)
g*
Search down the word at the cursor position (partial match)
g#
Search for words at the cursor position (partially match)
4. Mark)
ma
A is a lowercase letter, and A is set for the place where the cursor is located.
mA
A is an uppercase letter, and a is the place where the cursor is located.
5. Use bookmarks (mark)
`a
Go to file bookmarks A, top of the tab key
'a
To the beginning of the line where file bookmarks A are located, enter to the left
`A
Go to the position a of the global bookmarks, top of the tab key
'A
To the beginning of the row where global bookmarks A is located, and to the left of the Enter key
`n
If n = 0, the buffer will open the last document, and the cursor is at the last position of the last edit, and so on from 1 to 9.
'n
If n = 0, the buffer will open the last document, and the cursor will be at the beginning of the line where the last edited position is located, and so on from 1 to 9.
6. view the bookmarks list
:marks
View all current bookmarks
-
For more information, see "LIU Da's csdn blog": blog.csdn.net/poechant
-