[Configuration] Location of gvim and VIM configuration files

Source: Internet
Author: User

Setting set wrap in. vimrc is ineffective today. Later we found that gvim's configuration file is different from Vim's! No culture is terrible ......

 

First, the current user directory contains three files and folders.
. VIM: this is the place to save the plug-in colors related to VIM. Of course, this is a personal location.
. Vimrc Vim configuration file
. Gvimrc gvim configuration file

When Vim is started ~ /Search for the above files and folders,
If we need to customize the current user's vim usage habits, we will directly copy the corresponding Vim script to the. Vim folder. Then, add the corresponding configuration commands in vimrc and gvimrc. For example, to specify a colorscheme, You need to desert. the color configuration script is available in the colors of vim. configure colorscheme desert in vimrc.

There are two important aspects for the vim settings of the entire system.
1./etc/Vim/
2./usr/share/Vim/

The vimrc and gvimrc files affect the global settings. In general, the configuration file is in/etc, while the two folders of colors plugin and other scripts are placed under/usr/share/vim.

Here is a question: how can we make all vimrc have global information?
1. In ~ /. In vimrc, we can use
If filereadable ('/etc/Vim/vimc ')
Source/etc/Vim/vimrc
To import global vimrc.
2. Create a soft link to the ETC file under/usr/share/vim.
Ln-S/etc/Vim/vimrc/usr/share/Vim/vimrc
Ln-S/etc/Vim/gvimrc/usr/share/Vim/gvimrc

In this way, you can manage the vim configuration files and scripts.

Related Article

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.