Location of configuration files for Gvim and vim

Source: Internet
Author: User

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 directory
Vim this is the place to save vim-related plugin colors, of course it's a personal location.
. VIMRC Vim's configuration file
. GVIMRC Gvim Configuration file

When you start Vim, you will search for the above files and folders under ~/,
So if we need to customize the current user's vim usage, we'll just copy the vim script to the. Vim folder. Then add the corresponding configuration commands to the VIMRC and GVIMRC, such as assigning a colorscheme to the Desert.vim colors with the corresponding color configuration script, and then configuring VIMRC ColorScheme inside the. Desert Just fine.

There are two important parts to the VIM setting for the entire system.
1./etc/vim/
2./usr/share/vim/

The VIMRC and GVIMRC two files here will affect the global settings. Generally in/etc is the configuration file, and colors plugin two folders and other scripts are placed under/usr/share/vim.

Here's the question of how to make all the VIMRC have a global message.
1. We can use the ~/.VIMRC inside
If Filereadable ('/ETC/VIM/VIMC ')
Source/etc/vim/vimrc
To import the global VIMRC.
2. to establish the corresponding etc soft link under the/usr/share/vim
Ln-s/ETC/VIM/VIMRC/USR/SHARE/VIM/VIMRC
Ln-s/ETC/VIM/GVIMRC/USR/SHARE/VIM/GVIMRC

This will allow you to manage Vim's 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.