Vim configure PHP syntax highlighting

Source: Internet
Author: User

After Vim is installed, place the PHP syntax highlighting plug-in PHP. Vim in the/usr/share/Vim/vimfiles/syntax directory.

PHP syntax highlighting plug-in download here: http://www.vim.org/scripts/script.php? Script_id = 1, 1571

Then configure the vim configuration file vimrc here/etc/vimrc and add a line "syntax on ". Note that there is also a configuration file virc in this directory, which is the VI configuration file.

If you use VI to open the PHP file you want to edit but do not see the highlighted file, you can use Vim to enable it. This indicates that the VI command is not associated with vim. Need to be associated.

# Rm/bin/VI (we recommend that you back up your backup just in case)

# Ln-S/usr/bin/Vim/bin/VI

 

In addition, the vim color solution directory is/usr/share/Vim/vim72/colors/. You can download some of your favorite color schemes from the Internet and use them here.

Here there are a lot of color schemes, http://vimcolorschemetest.googlecode.com/svn/html/index-c.html (C language)

Http://vimcolorschemetest.googlecode.com/svn/html/index-html.html (HTML)

Http://vimcolorschemetest.googlecode.com/svn/html/index-pl.html (Perl)

After the preceding configuration, HTML, CSS, and other files are highlighted. If not, configure the settings as follows:

Similarly, configure HTML syntax highlighting and download the HTML syntax highlighting plug-in HTML. Vim to the/usr/share/Vim/vimfiles/syntax directory,

Here: http://www.vim.org/scripts/script.php? Script_id = 1, 453

The preceding directories are the directories of the centos system.

 

 

I have attached two other small sites of my own. It is very good. Please support it. Thank you ~

Http://www.letsfeel.com laixiu fashion Network

Http://123-dao.com cloud smart web site navigation

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.