VIM Quick note

Source: Internet
Author: User

NERD Commenter is a classic code comment plugin for Vim, which, by name, is the same author as the NERD tree. With this plugin, you can annotate files of multiple file types in different ways and quickly. This is a powerful tool for improving efficiency and pleasure for the students who use vim to write code or modify configuration files. You can go here to download this plugin, the compressed package inside the doc/and plugin/folder to ~/.vim/below is installed. In order to be able to use its help documentation, you also need to do this in vim: Helptags ~/.vim/doc/to register.

This paper introduces the common key bindings of nerd commenter, and uses the method of using C + + file as an example, please: H nerdcommenter. In normal or Visual mode:

  • , CA, switch between optional annotation modes, such as block comments/*///and line comments//
  • , CC, note when moving forward
  • , c, toggle comment/non-comment status
  • , CS, commenting in a "sexy" way
  • , CA, add an annotation at the end of the current line, and enter insert mode
  • , Cu, uncomment
  • In normal mode, you can specify the number of lines in front of almost all commands
  • Execute commands in visual mode to comment/counter-annotate specific chunks that are selected

Note: Each command prefix can be set by itself, usually a comma ', ' or ' \ '.

VIM Quick note

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.