Everyone crossing, welcome to listen to the large-scale couplet science fiction: Vim. Last time we talked about the dragon-Slayer knife: The point of vim
Body knife. This time, let's go on with Vim's Blade: The Dragon Sword, Vim's escape. Well, that's the word, the gossip,
Words return to the positive turn. Let's talk about vim together!
Crossing, Dragon Sword vim of the carefree knife of the popular point, that is, it is to use the Dragon Sword to manipulate the file. Because it's more than other file manipulation tools make
More handy to use, so the operation of the document is clearly a carefree appearance, carefree knife from this. But professionally called.
The file Operation command for VIM.
Dragon Slayer knife Vim's carefree blade is a set of knives, this set of knives including three sub-knives: The method of operation, repair knife and close the sword. The professional of Xiaoyao knife
Explanation: There are three common steps to using VIM to edit a file: Open the file, edit the file, and close the file. Now, let's say, separately.
These sub-knives, further talk about the carefree knife.
Operation Method : The so-called surgery is to open the file. Professional is called using Vim to open files. Using the command in a Linux terminal: Vim file
Name, you can open the file and, if it does not exist, create a new file. For example, Vim test.sh will open in the current directory test.sh
File, if the file does not exist, then vim creates a file called test.sh.
Trimming : The so-called trimming is to modify the file. Professional is called using Vim to edit files. When you open a file with Vim, you can edit the file
In the content of, how to edit the file, completely depends on the crossing own needs, when editing the file will be combined with our previous chapter back said
All kinds of knives.
Cutting the knife: the so-called closing knife is to close the file. Professional is called using Vim to close the file. You need to close the file after you have finished editing the file with Vim.
When you close the file, you need to execute the Q or q! command in VIM's command mode, q means to close the file, and if the file has been modified, vim
will be friendly tip: If you need to save the modified content to a file. q! indicates that the file is forcibly closed, regardless of whether the file has been modified or not, it
does not give user-friendly hints, but ignores the modified content to close the file directly. Crossing, I suggest that before closing the file, you'd better put
The modified content is saved to a file. The command to save the file is: W. Execute the W command in command mode to modify the contents of the file when editing
Saved to a file. Therefore, you often use the WQ command to close the file, and the Wq command indicates that the file is saved and the file is closed.
Crossing, combining these three knives together, constitutes a complete set of carefree knives. Crossing, the operation files can be entered by
command to achieve, no longer need to use the mouse to point on the file, it is how carefree things ah. If the Fox Warrior learns to slay the dragon
DAO: Vim of the carefree knife, he is not to laugh proud of the lake, haha.
You crossing, about the Dragon Sword: Vim of the knife, today said here so far. You know, the Dragon Slayer blades more knives? and listen to tell.
Talk vim together (12th: VIM)