twig.vim


Ⅰ. 插件描述

Twig syntax highlighting, indentation, neocomplete and UltiSnips snippets in Vim

Ⅱ. 基本信息

创建日期:  2016-05-25
使用用户:  61
Github星:  19
插件作者:  Nelson Yeung

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Twig.vim
Twig syntax highlighting, indentation, neocomplete and UltiSnips snippets in
Vim

Installation

To install twig.vim and other Vim plug-ins it is recommended to use one of the
popular package managers for Vim, rather than installing by drag and drop all
required files into your .vim folder.

Neobundle (recommended)

  1. Setup the neobundle package

     manager
  2. Set the bundles for twig.vim

    NeoBundle 'nelsyeung/twig.vim'
  3. Open up Vim and start installation with :NeoBundleInstall

Vundle

  1. Setup the vundle package manager
  2. Set the bundles for twig.vim

    Plugin 'nelsyeung/twig.vim'
  3. Open up Vim and start installation with :PluginInstall

Manual (not recommended)

  1. Download the twig.vim files
  2. Put files in your Vim directory (usually ~/.vim/ or

     `%PROGRAMFILES%/Vim/vimfiles` on Windows)
    

Snippets

This package does not include the old snipMate snippets in favour of
Neosnippet. Follow the instructions
on their page to get snippets working. Although a
neosnippet-snippets
have the snippets from this package, it might not be the latest version. To
have the latest snippets working, you can add to your .vimrc

let g:neosnippet#snippets_directory='~/.vim/bundle/twig.vim/neosnippets'

Todo

  • Better filetype detection. Detect html.twig, js.twig differently. This will
    need to change both ftdetect and indent files.
  • More useful snippets.

添加新评论