Linux Learning Log (Basic)----Vim's editing mode and last-line mode __linux

Source: Internet
Author: User
Tags exit in touch command
    4, vim switch from command mode to edit mode A: Insert large A from the back of the cursor: End of line insert I: With a, insert large I: start at the beginning of the cursor Insert O: start at the beginning of the current cursor Insert Big O: Another The line begins to insert S: Eats the current cursor-covered character and begins inserting the big s: Eat one line and start inserting 5. The last line mode of VIM uses ESC to exit edit mode using: Enter the last line mode in last line mode, direct Enter a number, jump back to the corresponding line number WQ: Save and exit Q: Exit, if made changes, prompts whether to save, if not modified, will directly exit Q.  : Exit Do not save W: Save do not exit X: function is equivalent to WQ, save and exit in command mode there is also an exit and save command: Shift + ZZ, but he and Wq are different WQ will create a new file, shift 
        + ZZ does not, so you can directly use VI to create a new file without touch command Eg:vi test Wq exit and save, the current directory will have a new file test, use SHIFT + ZZ is no such effect
             Replace operation in end-line mode Chinese, Mike is a, beautiful Countroy!!!
             Mike is a Chinese, Mike are from, and is a beautiful Countroy!!!
             Mike is a Chinese, Mike are from, and is a beautiful Countroy!!!
             Mike is a Chinese, Mike are from, and is a beautiful Countroy!!! Mike is a Chinese, Mike are from, CHIna is a beautiful Countroy!!!
             Chinese Mike is a-beautiful, Mike is from, and is a Countroy!!!
             Mike is a Chinese, Mike are from, and is a beautiful Countroy!!!
             Mike is a Chinese, Mike are from, and is a beautiful Countroy!!!
             Mike is a Chinese, Mike are from, and is a beautiful Countroy!!!
             Mike is a Chinese, Mike are from, and is a beautiful Countroy!!!
            Mike is a Chinese, Mike are from, and is a beautiful Countroy!!! You can replace the top mike with the specified string in this case with the Heqile format: s/old/new/(G[c]) after the last row mode substitution operation. G is not asking straight
                    Replace, and if the parameter is a GC, it will be asked when replacing: Mike in line 27th is replaced with Heqile: first place the cursor in line 27th and then into the last line mode
                    All of the s/mike/heqile on line 27th are replaced with Heqile: first place the cursor in line 27th, then enter the last line mode s/mike/heqile/g range substitution, 26 lines to 36 of the lines of MikeReplace all with Heqile 26,36s/mike/heqile/g replace all the selected strings in this article with the specified new string (using the wildcard character%)%s/ Mike/heqile/g Vim's split-screen SP: Horizontal split-screen VSP: Vertical Splitter Ctrl + WW: Toggle screen Qall: Exit all current Screens
                Screen VSP Another document in the current directory: You can open another file vertically and split the screen when it is opened: Vi-o test1.cpp test2.cpp small o represents horizontal split screen Vi-o test1.cpp test2.cpp Large O represents horizontal split screen
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.