Vim level notes (continuous update)

Source: Internet
Author: User

A long way to practice ... As a vs heavy-dependent patient, plus visual assist X this lazy necessary divine plugin, transfer to Vim under the door, really all kinds of pain ...

Vim with the use of a mouse to point to the impulse, there are wood ah!

However, after a period of use, slowly feel the unfathomable power of vim ....

?

(Emacs What a ghost,,,)

Let's talk about my training course,

?

First Lesson,

let's start with a very good profile. Concise VIM training Strategy , the English original here learn vim progressively. Very good information, the most basic features of Vim are described, as the article said, to survive the first ...

  • I→insert mode, press ESC to return to Normal mode.
  • x→ Delete the character of the current cursor.
  • : wq→ disk + exit (: W disk,: Q exit)?? can be used directly: X, if you have more than one window open: QA or: XA
  • dd→ Delete the current row and save the deleted row to the Clipboard
  • p→ pasting the Clipboard
  • Recommended:
  • HJKL (strong example recommends using it to move the cursor, but not necessary) → You can also use the cursor key (←↓↑→). Note: J is like the down arrow.
  • a→ inserted after the cursor
  • o→ inserts a new row after the current row
  • o→ inserting a new row before the current line
  • Cw→ replaces characters from the position of the cursor to the end of a word
  • 0→ Digit Zero, to the wardrobe
  • ^→ to the first position of the bank that is not the blank character (the so-called blank character is a space, tab, line break, carriage return, etc.)
  • $→ to the end of our line
  • g_→ to the last position of the bank that is not a blank character.
  • /pattern→ Searching for pattern strings (Chenhao Note: If you search for multiple matches, you can press N to next)
  • p→ paste
  • yy→ copy Current line of business in DdP
  • U→undo
  • <c-r>→redo
  • : E <path/to/file>→ Open a file
  • : w→ Disk
  • : SaveAs <path/to/file>→ saved as <path/to/file>
  • : X, ZZ or: wq→ Save and exit (: X means save only when needed, ZZ does not need to enter a colon and return)
  • : q!→ exit does not save: qa! forcibly quits all files being edited, even if other files have changed .
  • : Bn and: bp→ You can open many files at the same time, use these two commands to switch to the next or previous file. (Chenhao Note: I like to use: N to the next file)
  • ng→ to Nth Line (Chenhao Note: Note that the G in the command is uppercase, and I generally use: N to nth rows, such as: 137 To line 137th)
  • gg→ to the first line. (Chenhao Note: equivalent to 1G, or: 1)
  • g→ to the last line.
  • : SP divides the current file into two columns (the same file is displayed in column two, which facilitates long file editing)
  • : Vnew vertical column, divided into left and right columns, and creates a new file in another column
  • <C-w> plus j/k/h/l Switch to window up/down/left/right (multi-window operation)

These are the currently mastered and commonly used functions.

Nerdtree command

  • Ctrl+w+h? cursor focus to the left of the tree directory, CTRL+W+L cursor focus to the right of the file display window. Press ctrl+w multiple times, the cursor automatically switches in the left and right window

  • S??? Vsplit A new window opens the selected file and jumps to the window

?

About VIM Configuration

Plug - ins

Refer to this article to transform vim into a powerful ide-vim integrated ctags/taglist/cscope/winmanager/nerdtree/omnicppcomplete (with a picture of the truth), very detailed, very powerful!

After installing Supertab (as the name says,,,), C.vim (c + + file),? delimitmate (auto pairing),? Vim-surround (add pairing symbol <,[,{, (etc.),? Vim-color-solarized (classic color theme),? Youcompleteme (Super Powerful auto-complete plug-in, is the configuration is a bit complicated)

?

?

Vim Key Mapping

Http://www.cnblogs.com/softwaretesting/archive/2011/09/28/2194515.html

?

Use: Make command to invoke Cmake/wmake

Insert in. vimrc

?

: Set Makeprg=wmake

?

?

?

?

?

?

?

?

?

?

Vim level notes (continuous update)

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.