1. Use Vim's comparison mode to open two files:Vim-D file1 file2OrVimdiff file1 file2
2. If the file file1 has been opened, open another file file2 for comparison:: Vert diffsplit file2If the vert command is not used, diffsplit will split up and
Horizontal cutting:: Split: Split XXX (file name to open): New (create a file in the new window) K: Jump to the window above (if it is capital K, the current window is raised to the top) J: Jump to the following window (similar to the above)Vertical
Currently, gvim can only be used in windows.Code. Most of the time, we want the editor to be opened to maximize, so that the code can be displayed as much as possible.
Here is a Vim extension (not a plug-in). First download the compressed package
Two modes:■ Normal mode (Normal Mode)■ Insert mode)
In insert mode, press escape to enter normal mode. In normal mode, press I to enter insert mode.
The insert mode is used to edit text. commands are generally used in Normal Mode:
Positioning:
■
Some advanced editors will contain macro functions, which are certainly not missing in Vim. It is very convenient to use Macros in VIM:
: QX starts to record macros and saves the results to register xQ exit record mode@ X macro commands for
Grep does not support regular expression matching.
Egrep supports regular expression matching, but the extension does not.
Find Vim /? : Regular Expression matching is supported, but not extended.
Common examples:
Grep XXX 123.logBasic
Disclaimer (read only !) : The original translations of all tutorials provided by this blog are from the Internet and are only for learning and communication purposes. Do not conduct commercial communications. At the same time, do not remove this
Common Vim operations, plug-ins, and vimrc files
First:
My custom color scheme:
The evening color scheme of the system:
1. Common OperationsVim, as a text editor, is powerful. In my opinion, it is quick editing, and rich extension plug-
-- To do good things, you must first sharpen the tool.Vim is VI improved. VI is an excellent text editor on Unix-like systems. It is better to use gvim on various platforms.Vim's official website is: gvim inside the http://www.vim.org Program Free
A friend previously hoped that I could list all the vim plug-ins I used in my blog. I have never had time to list them. In the last few hours of the weekend, I would like to list them for you, retrieve what you need ~Okay. Let's talk about it one by
Register
The editor usually has a clipboard to store the copied and cut content. A similar concept in VIM is called register ). Besides an anonymous register, VIM also has a bunch of well-known registers. You can use "(see": Help "") or "Ctrl-R"
Vi7.0 comes with the automatic completion function omni-completion.
So how does Vim find matching words? By default, VIM performs the following steps when searching for a word:
1. Search the current file.
2. Search in other windows
3. Search for
1. securecrt
Settings in session
1) Session option → select the font (New, or fix-sys, or others), and select chinese_gb2312 for the character set.
2) Vim/etc/sysconfig/i18n
Lang = "zh_CN.UTF-8"
3) VI ~ /. Bash_profile
Export lang = zh_CN.UTF-8
2.
Lecture 1: 1. move the cursor in the screen text. You can use the arrow keys or the hjkl keys.
H (left shift) J (downstream) K (upstream) L (right shift) 2. to enter the vim Editor (from the command line prompt), enter the: Vim file name 3. to exit
In VI/vim, you can use the: s command to replace the string. In the past, we used only one format to replace the full text. Today we found that there are many ways to write this command (VI is really powerful, and there are still a lot to learn).
I. Overview
First of all, VIM + cssag + ctags are really powerful. I feel very ashamed of it for me who have been playing in Linux for nearly two years. I have rarely used Vim before, and have never touched cssag and ctags. I also use gedit and find
Http://xbeta.info/vim-tutorials.htm
"General settings """"""""""""""""Set nocompatible
Filetype plugin onFiletype indent on
Set autoreadSet rulerSet nu
Set laststatus = 1
"Configure backspace so it acts as it shoshould ActSet backspace = EOL, start,
I have used Vim configuration for 4-5 years. Very good
Configuration File + plug-in package + tag Script:/files/magic-Chen/vim_config.rar
First, upload the image:
Configuration file:"""""""""""""""""""""""""""""""""
"Peter. Chen
"""""""""""""""
If you do not know the location of the configuration file and script, run the following command in VIM: scriptnames: path/etc/vimrc/usr/share/Vim/vim72/syntax. vim/usr/share/Vim/vim72/syntax/synload. vim/usr/share/Vim/vim72/syntax/syncolor.
When writing a Python script this evening, you need to configure Vim again. Now that you have configured it, share it with us. We can make a backup here.
In the past, I seem to have written articles about Vim configuration, but this is not my
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.