Write with vim (1)

Source: Internet
Author: User

This article is from svitter's blog

  • Was Vim used about a year ago? This is also an uncertain time. The specific time when Vim was used has been forgotten.
    It is still easy to use, but many things have not been carefully studied yet. The simplest part is
    Regular Expression matching and vimscript writing. There is no specific time to go into depth. After all
    There are too many things to explore in the world of technology =.

  • In most cases, I still think that writing some blogs that my predecessors already have is of no value, but I want to write a blog.
    Who is it for? Isn't it for yourself. Only by summing up the past can we better move forward to the future.

  • In addition, we have recently started to read Emacs. But it always feels like this is a bad behavior-Vim I haven't thoroughly studied yet, just
    I ran to e to go around and look at it. In the end, none of them worked well. Who knows?

  • This article is intended for beginners.

  • In addition, today we found that K is used to search for commands (the default value is! Man) [2014-09-27]

Start with vim

When I was learning vim, I followed the understanding of the great gods and followed vimtutor. It was quite good.
The most important thing is to use Vim more and never stop. Even if it was uncomfortable at the beginning, you should stick to it.

  1. The first step is to learnvimtutorThis is beyond doubt. Key InputiAnd mobilehjklRemember it.
    The most important task in the future is to keep using vim, even if you think it is slow. Of course, you must think about how fast it can be.
    Learning and usingvimtutorEnter:
    Vimtutor
    I personally think the first step is the most difficult one. In particular, it is very slow to get through that section, and it is not enough to use the mouse.

  2. Then, skip to question 3 or the question. Gradually discover familiar<C-c>(That isCtrl+c) It cannot be used. In vim
    Changed to the exit command (like ESC) (originally, ESC was used to exit the editing mode, but later found<C-c>
    It is quick, so you can use it. (If you do not understand it, return to the first exercise ). Then find the copy information in Vim,
    Pasting method-at least I am. Then we will understand the register information in vim.

  3. Then we started to look for commands that can be edited quickly, for examplew|e|f. I personally preferfThis allows me
    Quickly locate a letter in a sentence.w,eHowever, it is rarely used,bI do not like the location. In this
    Roughd | s | cThese guys are coming soon.

  4. Then I began to find out the benefits of numbers and uppercase letters. It is also a process of learning from small to upper-case letters.
    To remember how it works, you just need to check the location where it appears. If you use more, you will naturally.

  5. After getting used to it, we will get used to line feed, search, replace, and so on. In this process, the search is still used a lot,
    However, I often forget how to use the replaced commands. For more information about line breaks, seeRow number G, Or
    : Row numberThen wait.

Advanced?

You can also download my configuration directly, but it has not changed much.

  1. They all come one step at a time, but I also forget how I came along. It is still very watery. I will not configure online search and then copy
    In your own vimrc. When I got to the advanced level, I almost understood what vimrc was like-because I may not be able to stand the fonts, colors, and
    Directory-or parentheses matching. At this time, the role of vimrc came out.
    At this time, I recommend that you use my configuration, which is also a very popular version based on the network:
 
 
  1. git clone http://github.com/Svtter/MyVimrc
  2. ./install

In this way, you can install and run it. It is normal to see a problem. If you don't care about it, continue using it. If you care about it, Baidu. Many
The problem may be that vundle is not properly installed.
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

  1. I found this magic editing after. vimrc. Multipart editing can greatly improve efficiency. And then stop
    See vimrc! Then, extract the essence from help!

  2. In the next step, I will be familiar with the record mode and regular expression matching, as well as vimscript writing and so on. Hope this article
    You are helpful.

Write with vim (1)

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.