Vim hands-on manual (6) common search and bookmarking operation buttons

Source: Internet
Author: User

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
  • /stringSearch down the string "string"
  • ?stringSearch for the string "string"
2. Repeat the previous search
  • nLocate the next matched string based on the previous Search Condition
  • NLocate 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)
  • maA is a lowercase letter, and A is set for the place where the cursor is located.
  • mAA is an uppercase letter, and a is the place where the cursor is located.
5. Use bookmarks (mark)
  • `aGo to file bookmarks A, top of the tab key
  • 'aTo the beginning of the line where file bookmarks A are located, enter to the left
  • `AGo to the position a of the global bookmarks, top of the tab key
  • 'ATo the beginning of the row where global bookmarks A is located, and to the left of the Enter key
  • `nIf 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.
  • 'nIf 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

:marksView all current bookmarks

-

For more information, see "LIU Da's csdn blog": blog.csdn.net/poechant

-

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.