"Under the directory/etc/, there is a file called VIMRC,"This is a public vim profile in the system and is valid for all users." And in each user's mainDirectory, you can set up your own private configuration file, named:. VIMRC
"Cancel Automatic
Original address: http://www.cnblogs.com/joeyupdo/archive/2013/03/03/2941737.html
-----------
In vim to edit a Chinese text, sometimes seems to have garbled, before are tinkering to get no garbled, the problem has always been bothering me. Suddenly
Vim is a powerful text editor, by default there are three modes: Command mode, insert mode, edit mode, use # Vim file to open a file, the default into the command mode, different modes of direct switching as followsA. Command mode switch to insert
Setting set wrap in. VIMRC is not effective today. It was later found that Gvim's configuration files were different from Vim's. No culture, it's terrible ...
First, there will be three files and folders under the current user directoryVim this
1, the location of the configuration fileUnder the directory/etc/, there is a name named
VIMRCFile, which is the public vim profile in the system and is valid for all users. In each user's home directory, you can create a private profile of your own,
1. Establish a location
(1) Unix
~/.vimrc
(2) Ms-windows
$HOME/_VIMRC
$VIM/_VIMRC
Note: ①.VIMRC is a point in front, indicating that the hidden files in Linux, you can directly open, if you need to see if you should use the LS-A command.
②
1. Label
(1) Nameless label
": This is two single quotes, meaning to jump back and forth two times before and after the jump.
: Jump back and forth between two file, is the "Global version of the command."
: Very familiar, jump back, O means older.
:
Ubuntu,vim The default external registers are +
Copy the contents of vim to the system, select the content, and then "+y, you can copy it to the outside."Copy the contents of the system to vim, select a location, and then "+p, you can copy it into
The Vim configuration file path is typically/ETC/VIM/VIMRC
CTRL + P//prompt to be padded
GG=G//Automatic typesetting
$//Move the cursor to the end of the bank.
: X//Save exit
:%s/emacs/vim/g//Replace all Emacs in the current line with VIM
The
How to use "+p
20130726 3:40
Reason:
The registers available under VI or VIM without a graphical interface include only {a-za-z0-9.%#:-"}, and do not contain" * or "+ and other options and drag-and-drop latches.
Vim--version viewing version
Often forget some of the vim of the operation of the shortcut keys, it is now recorded, convenient for later review (this is defined as the right side of the text before the text left direction for the following):Left and RIGHT ARROW keys: K, J, H,
There are three modes of VIMCommand mode, default into command mode;Edit mode, a I o enter the editing mode, you can edit the text content; Esc tangent back to command modeExpansion mode,: Enter the expansion mode, you can save the exit and other
The reason is that the VI or vim before the operation of the use of VI or VIM operation Test.java file when an abnormal interruption, so in the current directory produced a. Test.java.swp file, this file using the LS command to view can not be found,
VIM +n filename: Cursor positioned to nth row of filenameShortcut keys:J Move Down, K move up, H shift, L move right, ctrl+f or pageup up one screen, ctrl+b or pagedown down one screen.GG moves to the first line, and G moves to the last row.NG, move
Dd
You can delete the current line of the cursor;
Ndd
n represents the number of rows, 3DD, deleted from the current cursor down 3 lines;
Di
Deletes the contents within the specified symbol, such as an
CycleForWhileUntil for 变量 in 列表; do 循环体 doneE.g for I in ' seq 1 $FILE '; Doecho "Hello, ' head-n $I/etc/passwd | Tail-1 | Cut-d ', '-f1,7 ' "Done Vim Editor: Edit mode input mode last line mode edit-Input:
Vim Editor vim是vi编辑器的增强版,是unix/Linux系统默认的文本编辑器Vim three modes of operation 命令模式: vim 输入模式: 按键 I 进入输入模式 末行模式: 按键ESC : 进入末行模式Vim can create and modify files 新建:Vim 文件名 修改:Vim 已存在的文件 Wq : 保存并退出VIM Command mode
Vim's shortcut keys(0) 3 The toggle between modes is default in command mode. I key, from command mode, into insert mode. The colon (:) key, from the command mode, enters the last line mode. Esc key, from insert mode, last line mode, into command
Linux tab and shell complement Python-meets-Blog ParkHttps://www.cnblogs.com/guobaoyuan/p/8276141.htmlHow does a Python code complement in Vim? -Knowhttps://www.zhihu.com/question/20371683Wklken/k-vim:vim
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