Vim Learning Summary

Source: Internet
Author: User
Tags sublime text

Vim

I haven't felt much more efficient than using sublime text on my Mac at the moment.

Installation

sudo apt-get install vim

Common configuration

  In the Linux environment, VIM's initialization configuration file is. VimRC, usually two, system version and user version, the former is generally located in/etc/ VIMRC, is the default configuration of the entire system vim. The latter is located in ~/.VIMRC, which is the current user's vim configuration, overwriting the system.

Show line number: We enter command: Vim ~/. VIMRC   ~/. VIMRC set   TS=4 or set tabstop=4 set code highlighting   syntax on (Automatic syntax highlighting) using the color scheme   ColorScheme Desert allows you to use mouse to click to locate   set mouse=A highlight cursor row   set Cursorline ignore case   when searching Set ignorecase highlight the searched sentence   Set Incsearch search, the input words of the verbatim Fugauliang   set Incsearch

Currently common operations

 Beginner: i-in insert mode, press ESC to return to normal mode x-Delete one character of the current cursor: WqSave +exit VIM DD-Delete the current row, delete the row saved in the Clipboard p-paste Clipboard contents o-to restart a row after the current line insert cursor movement: 0-> Digital Zero, move the cursor to the wardrobe (really?) + <-convenient) $-move cursor to end of line (IBID.), n$ move to line end NG of Nth row-cursor to Nth row, N is number line GGThe cursor to the first line (why not?) +on) G-cursor to Tail line (IBID.) W/e-> move backwards by word (not as option +direction key) b-move forward by word (IBID.)%->match the move cursor by parentheses CTRL+f->page forward CTRL+b->Page Backward search: input in command mode'/word ', that is, find ' word 'continue to press the N key to find the next matching search, press N to match up to disk: : Q!->do not save direct exit: E!->Discard Modify file contents, reload the file edit: WqSave and exit

Configuration details: http://blog.csdn.net/g_brightboy/article/details/14229139

Tutorial: http://blog.csdn.net/niushuai666/article/details/7275406

Vim Learning Summary

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.