Ⅰ. 插件描述
Syntax highlighting for VIMⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'slim-template/vim-slim-you-belong-with-me'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'slim-template/vim-slim-you-belong-with-me'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'slim-template/vim-slim-you-belong-with-me'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/slim-template/vim-slim
Ⅳ. 文档说明
vim-slim
slim syntax highlighting for vim.
Install with pathogen
If you are already using pathogen, you can skip to step 3.
Install pathogen (if you haven't already)
mkdir -p ~/.vim/autoload ~/.vim/bundle && \ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vimEdit
~/.vimrcto run pathogen as the first line of the file (if you haven't already)execute pathogen#infect() syntax on filetype plugin indent onInstall slim-vim
pushd ~/.vim/bundle; \ git clone git://github.com/slim-template/vim-slim.git; \ popd
Install with Vundle
- [Install Vundle] into
~/.vim/bundle/.
mkdir -p ~/.vim/bundle; pushd ~/.vim/bundle; \
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
popd
- Configure your vimrc for Vundle. Here's a bare-minimum vimrc that enables vim-slim :
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'slim-template/vim-slim.git'
call vundle#end()
syntax enable
filetype plugin indent onIf you're adding Vundle to a built-up vimrc, just make sure all these calls
are in there and that they occur in this order.
- Open vim and run
:PluginInstall.
To update, open vim and run :PluginInstall! (notice the bang!)
Known Issues
We use setfiletype upon autodetect, which does not overrides filetype once it
was set. That leads into an issue when filetype is set to html before we took
our chance (happens when slim file has doctype html header):
Vim's
filetype.vimhas anautocmdthat tries to detect html files based
on doctype and this is triggered before scripts inftdetect/*
are sourced.-- https://github.com/slim-template/vim-slim/issues/38#issuecomment-23760100
To avoid that you have two options. Either using doctype 5 instead ofdoctype html or adding your own enforced version of autocmd to your.vimrc:
autocmd BufNewFile,BufRead *.slim setlocal filetype=slimSee Also: