Mac &linux Vim Configure

Source: Internet
Author: User

Both Mac and Linux vim reads the local user directory's configuration file

The current user home directory creates a new file. VIMRC inside the parameter when vim starts, it automatically loads

Reprinted from: http://blog.csdn.net/jiankun_wang/article/details/4125157

After the installation of Debian, the remote SSH login, VIM has two problems:

1. After setting syntax on in the ~/.VIMRC file, run vim and display the following error:

Error detected while PROCESSING/HOME/ADMINISTRATOR/.VIMRC:
Line 5:
E319:sorry, the command is not available in this version:syntax on
Press ENTER or type command to continue

This problem is due to the Debian default vim version of the problem, run command apt-get install vim after the installation of other packages, after the installation is complete, there is no longer this problem.

2, although no longer reported 1 errors, but still do not display color, but instead of using underscores instead of color

This problem is caused by the inappropriate value of the variable term, which runs the command echo $TERM display: VT100
In ~/.BASHRC, set $term to: Xterm-color as follows:

Export Term=xterm-color
Then run the command: source. BASHRC to display the color.

In addition, I would like to introduce the Vim configuration files:/ETC/VIM/VIMRC and ~/.VIMRC

1,/ETC/VIM/VIMRC is a global configuration file, modifying this profile will change the vim configuration of all users.

This file also creates a link file in the directory/usr/share/vim directory, as follows:

[email protected] :/usr/share/vim$ ll
Total
drwxr-xr-x  4 root root 4096 2009-04-26 19:13 addons
Drwxr-xr-x   2 root root 4096 2009-04-04 23:01 doc
drwxr-xr-x  2 root root 4096 2009-04-26 19:13 Registry
Drwxr-xr-x Root root 4096 2009-04-26 19:49 vim70
lrwxrwxrwx  1 root root    5 2009-04-04 18:59 vimcurrent- > Vim70
lrwxrwxrwx  1 root root    8 2009-04-04 18:59 vimfiles/etc/vim
lrwxrwxrwx& nbsp 1 root root   2009-04-04 23:01 vimrc/etc/vim/vimrc
lrwxrwxrwx  1 root root   19 2009 -04-04 23:01 vimrc.tiny-/etc/vim/vimrc.tiny
[email protected] :/usr/share/vim$

By default, Debian turns off the syntax color display in this configuration file. If a user needs a syntax color display, they can create a file in their home directory. VIMRC, modify the configuration in this file, this will only affect the user's display, this way more in line with the spirit of Linux.

2, ~/.VIMRC is the user's own Vim profile, the configuration set in this configuration file only affects the user himself.

Mac &linux Vim Configure

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.