..
Set nocompatible
"Set encoding = UTF-8
Set fileencodings = ucs-bom, UTF-8, gbk, default, latin1
"Use chinese help
Set helplang = cn
The purpose of the above code is to disable the vi compatibility mode (there are too few original vi functions and there is no need to consider compatibility) and check the file encoding in the UTF-8 or gbk order, set help to Chinese. However, setting set helplang = cn does not immediately display Chinese
VIM settings-discover the beauty of VIM and set vim
When I raised the code in Linux today, I suddenly found that I didn't even highlight the code. I searched for it on the Internet and found a great microblog.
This record: http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html
Very good and powerful. After decompression, vimrc is in the root directory. Rep
file content as a Big5 character sequence.
Line 2: similar to the above, the file suffixed with ". nfo" is treated as a CP437 encoding (that is, an English dos oem character set encoding) file. See Figure 19 for the effect.
Figure 19
Row 150th: after reading the. gb,. big5, or. nfo file (": help BufReadPost"), call the RestoreFileEncodings function to restore the original value of fileencodings.
Row 151st:. the CheckFileEncoding function is called to check
[Original] Vim's usage skills: only when used can we understand "the best IDE is Vim" and vim's usage skills.
Half a year ago, I was still wandering in IDE such as Eclipse and ZendStudio. However, for the use of Vim over the past six months, I have to say that Vim is more efficient. It takes time to configure your own Vim
[Vim] vim learning notes-open, switch, and close multiple files. vim learning notesOne case is to use vim in shell to open multiple files, and the other case is to open multiple files in the vim editor.Open multiple files at the same timeVim file1 file2Open the file and disp
Introduction to VimVim is a well-known, powerful, highly customizable text editor similar to VI, which improves and adds many features on the basis of VI.First install VimYum Install-y vim-enhanced·Let's compare the difference between the VI and VIM openLet's open the/etc/passwd/with VI and look at it.·Take a look at the vim/etc/passwd/again.·We can see VI open/e
Vim learning notes (1) -- vim operations and vim learning notes operations
Only record some of the most commonly used vim operations and update them at any timeText operations
D cut. Double-click to cut a row.
Copy y. Double-click to copy a row.
P Paste
X: Delete characters under the current cursor
R replaces th
Vim color scheme settings (change vim color scheme) (1) after vim is installed, run the command whereisvim and you will see the returned result: vim: /usr/bin/vim/usr/share/man/man1/vim.1.gz note: /usr/share/
First, edit mode, command modeIn general mode, enter: or/To enter command mode. In this mode, you can walk a character or string, save, replace, exit, display line number, etc./word: Look for a string after the cursor word, press N to go back to search? Word: Look for a string before the cursor word, press N to go back to search: n1,n2s/word1/word2/g: Find word1 between N1 and N2 rows and replace with Word2, no G replaces only the first word1 of each row: 1, $s/word1/word2/g: replace all word1 i
Tags: vim edit mode VIM Command mode18, vim into the editing mode, Vim command mode, VIM practiceFirst, vim into the editing modeedit Mode : You cannot modify a character in general mode, and you can only enter edit mode if you wa
document generation: when using vim, one of the skills you must master is to be proficient in using vim's online help document, where you can find everything you need, but you need to know what you want to know. All the above plug-ins have complete help documents, but you need to add them to the vim online help system for ease of searching. This step is simple:Switch www.2cto.com to the
replaces only the first word1 of each row
Other uses:
: W--------------------Save text
: Q--------------------Exit vim
: w! -------------------force save, under root user, even if the text is read-only can be saved
: q! -------------------forced exit, all changes do not take effect
: Wq------------------Save and exit
: Set Nu--------------Display line number
: Set Nonu------------do not display line numbers
Make vim a python development environment. The article uses pathogen + git to manage the Vim plug-in. Students who are not quite clear about this way can refer to the introduction of "3". Pathogen changed the original vim can only throw the plugin all to the. Vim directory operation mode, so that each plug-in can be a
[Vim] vim use notes -- split screen operation, vim --
We often need to open multiple files, operate multiple files in different windows, and split the screen is very useful.
1 command mode: new, create a file and split the screen, shortcut key, Ctrl + W, then immediately press the n key: spilt horizontal split screen, the current screen is divided into two, h
of VIM was changed to VI improved (improved.
Afterwards, VIM has added countless new features. As the first milestone, version 1994 added the multi-window editing mode (split windows) in 3.0 ). From then on, there can be more than one Vim editing file displayed on the same screen. Vim 1996, released in 4.0, is the fir
the file where the error prompt is located:
We can understand that the pyflakes. vim plug-in requires vim support for python. For this prompt, we will check the current vim support for python.
Execute this command: vim -- version | grep python
We can know that-python
Vim color scheme settings (Change vim color scheme) (1) After vim is installed, run the command whereis vim and you will see the returned result: vim: /usr/bin/vim/usr/share/man/man1/vim
Vim tutorial, vim
Vim is a powerful editor with many commands. This document will not be detailed in this tutorial. The purpose of this tutorial is to describe some necessary basic commands. With these commands, you can easily use vim as a universal editor. It takes about 25-30 minutes to complete this tutorial, depend
). When using the q key, @ add macro name, such as qa... Q: The recording name is a macro. @ a uses this macro.Execute shell commands
:! Command
:! Ls to list files in the current directory
:! Perl-c script. pl check the perl script syntax. It is very convenient to exit vim.
:! Perl script. pl: It is very convenient to execute a perl script without exiting 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.