Gvim Save settings in Windows

Source: Internet
Author: User
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 File Syntax on syntax highlighting Set number Colo elflord set color Set 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 indent
Set 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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.