VIM neophyte ' s Notes

Source: Internet
Author: User

1. Configurations in ~/.VIMRC

Thank the enthusiastic colleague to provide the vim configuration file, really save a lot of things ~ ~

Set Shiftwidth=4set tabstop=4set nu!set mouse=aset autoindentset rulerset incsearchset smartindentset expandtabfiletype Plugin indent onset fileencodings=utf-8,gb2312,gbk,gb18030  set termencoding=utf-8  set ENCODING=PRC set ts= 4set HLS

2. Basic VIM Commands

On the internet to find a VIM Cheat Sheet, at the same time he also organized a number of common commands:

(1) Move the cursor up or down:

        K    H   J   L

(2) Next/previous prefix: w/b

(3) Next/previous ending: E/ge

(4) Jump to Beginning/end: 0/$

(5) Skip to Top/end: gg/g

(6) Slide/slide: ctrl+e/ctrl+y

(7) Next page/previous page: Ctrl+f/ctrl+b

(8) Match next/previous cursor word: */#

(9) Jump to identifier first occurrence location: GD

(10) Jump to the next <pattern> occurrence position:/<pattern>

(11) Jump to the first <pattern> where it appears:?<pattern>

(12) Find mode skip to next/previous match location: n/n

(13) Skip back to previous location: Ctrl+o

  (14) Select the Word cursor: VAW

(15) Copy in Visual mode: Y

(16) larger/lower case in Visual mode: Gu/gu

(17) Copy entire: Ggyg

(18) Delete the character of the cursor (front): X (x)

(19) Insert content before/after the cursor: i/a

(20) Auto Completion in insert mode: ctrl+p

(21) Insert one line below/above the cursor: o/o

(22) Delete entire line: DD

(23) Copy entire line: yy

(24) Paste: P

(25) Undo Modification: U

(26) Reply to changes: Ctrl+r

(27) Up/down/left/right Sub-window:: Split/: Vsplit

(28) up/down/left/right split window to open other files:

: SP <filename>/: VSP <filename>

(29) Exit after saving: Wq

(30) Do not save exit:: q!

  

VIM neophyte ' s Notes

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.