phtml.vim


Ⅰ. 插件描述

A syntax file to php templates.

Ⅱ. 基本信息

创建日期:  2007-11-19
使用用户:  8
Github星:  1
插件作者:  Giuliani Sanches

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/phtml-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/phtml-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/phtml-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/phtml.vim

Ⅳ. 文档说明

Use this script to enable syntax coloring when using a mix of html and php or with template engines like those used by CakePHP, Symfony, SolarPHP and others

To use xmledit (vimscript #301) with phtml files change line 105 to:

if &filetype == 'xml' || (!exists ("g:did_xhtmlcf_inits") && exists ("g:xml_use_xhtml") && (&filetype == 'html' || &filetype == 'xhtml' || &filetype == 'php' || &filetype == 'phtml' || &filetype == 'rhtml'))

And line 168 to:

if (&filetype == 'html' || &filetype == 'php' || &filetype == 'phtml') && (!exists ("g:xml_no_html"))

And symlink:

cd $HOME/.vim/ftplugin
ln -s xml.vim phtml.vim

添加新评论