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.
The first step is to learnvimtutor
This is beyond doubt. Key Inputi
And mobilehjkl
Remember 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 usingvimtutor
Enter:
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.
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.
Then we started to look for commands that can be edited quickly, for examplew|e|f
. I personally preferf
This allows me
Quickly locate a letter in a sentence.w,e
However, it is rarely used,b
I do not like the location. In this
Roughd | s | c
These guys are coming soon.
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.
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 number
Then wait.
Advanced?
You can also download my configuration directly, but it has not changed much.
- 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:
git clone http://github.com/Svtter/MyVimrc
./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
I found this magic editing after. vimrc. Multipart editing can greatly improve efficiency. And then stop
See vimrc! Then, extract the essence from help!
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)