1.create a new document a.txt2.use gvimto edit a.txt. Enter the following command:
Mkvimrc! ~ /. Vimrc This command will be in ~ /Create a new. vimrc script file under the directory, that is, c: \ Users \ yourname. some information about the current window will be written into this file. 3. Edit ~ /. Vimrc file, because gvim will first execute this script every time it is started. You can add some commands to this script. Below are some of the commands I like to add. The following Chinese is an explanation. Do not add them.
Set nobackup does not upload files, avoiding automatic generation of a.txt ~ Backup FileSyntax on syntax highlightingSet numberColo elflord set colorSet guifont = las LAS: H15: cansi: Set the font to consolas and the font size to H15, which is a cansi character in Western Europe.Set nocompatible Set AI auto indentSet Si smart indent Number of rows displayed in set nu Set Ts = 4 one tab = 4 spaces Set BS = indent, EOL, start Set guioptions-= t no Toolbar Set
Foldmethod = indent "folding mode depends on Indentation
Nnoremap <Space> @ = (foldclosed (line ('.') <0 )? 'Zc': 'Z') <CR> Fold/expand with Space keyCode URL with two Vim commands: http://www.blogjava.net/woxingwosu/archive/2007/09/06/125193.htmlhttp://www.cnblogs.com/softwaretesting/archive/2011/07/12/2104435.html
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.