[UBUNTU--VIM]/.VIMRC Role and problems

Source: Internet
Author: User

problem Description: use sudo apt-get install vim under Ubuntu, installing vim OK, but each time you use vim to edit the code, you are prompted to "cannot execute the directory:" $HOME/.VIMRC "press Enter or other command to continue", Then press ENTER or you can continue to use VIM.

? about VIMRC: Its general introduction is visible in http://easwy.com/blog/archives/where-is-vimrc/, which mentions that it can be used in vim: version to view vim-related configuration files using: Echo $HOME can view the $home path involved in Vim, using: Echo $VIM to view the $vim path.

Can be modified/.VIMRC to some of the vim configuration, such as highlighting, line indentation, and so on, in particular, can refer to the following http://www.2cto.com/os/201308/232672.html? In addition http://yyq123.blogspot.com/2012/01/vim-vimrc.html here also has a more detailed/.VIMRC configuration example.

Problem solving: for? tip "Cannot execute directory:" $HOME/.VIMRC "press Enter or other command to continue", I copy the Vimrc_example.vim under/usr/share/vim/vim73 to the $home path, Rename to. VIMRC , but using vim to open the code file still prompts the above question.

According to the instructions, the. VIMRC is a directory under $home (username), and vim should be executed with a. VIMRC as a file, so first use rm-r. VIMRC command to delete the original. $home under VIMRC and then then? Copy the Vimrc_example.vim under/usr/share/vim/vim73 to the $home path, rename it to. VIMRC, and then use Vim again to stop the above hint. So the final reason for the problem is that after the vim is installed, there will be a. VIMRC under the $home, but this type is not correct, to change from directory to file, so you can use. VIMRC and Vim.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

[UBUNTU--VIM]/.VIMRC Role and problems

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.