Vim Common shortcut key summary

Source: Internet
Author: User






Edit command:




I insert the word "a" before inserting a        Line at the end of insert        an O new line edit O        Create a new row above




Insert:




X i * "ESC"        insert 10 *25 a XX "ESC"       insert 25 xxj            join merge two rows




Move:




4l        Move right 4 characters 0         move to beginning of line

^ Move to beginning $         move to end of line 2w move        backward two words 3W        backward Move three words (only by space) 2b move        forward two words 5B        forward five words (only by space) e         Move to the end of a word




To move inside the screen:




H move to        top m move to        center L move to bottom NH move to the       current screen nth row (UP) NL       moves to the nth row of the current screen (down)




Sentence, segment, section movement:




Move to end of sentence (move to beginning of sentence) {Move to beginning         of         paragraph} move to         end of paragraph [[        move to section start]]        move to end of section




Scroll screen:




"Ctrl" +f        down a screen "Ctrl" +b        up one screen "Ctrl" +d        down half screen "Ctrl" +u        down half screen




Search:




/XX        Search xx/"enter" to        search down? "Enter" Search        up F xx        line search xx (search backwards) F xx        in-line searching XX (forward search)


R        Replace replace mode s        Delete current word insert S        delete entire line insert from top to right        case transform


P put        placed 2p        placed 2 times (paste) XP        swapped two characters trans pose


d Delete        Delete 2dd        down delete 2 lines d3w        3 words back Delete d3wd2bd2b


Y         Yank copy yy        copy one line y2w       back two words y2b


C        CHANGECW        Modify the entire word c2w        modify the following 2 words c3b


R        Replace5rt        replace the next 5 characters with T


"Enter"        moves to the next line of the first character +                -moves to the previous line the first character ^                moves to the beginning of a non-blank place n|               Move to the current nth column


GG          moves to the top of the document G           moves to the bottom of the document 10G         moves to line 14th

"Ctrl" +g   Show line status


ZZ        Save exit: e!        Clear all editing results: q!        Do not save exit


.                Repeat last command u                undo Undo "Ctrl" +r        Redo Redo




Do not move the cursor scrolling screen




Z "Enter" places the line of the cursor at the top of the        screen z  .                    Place the line of the cursor in the center of the screen Z-                     places the cursor line at the bottom of the screen










Vim Common shortcut key 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.