liquid-types.vim


Ⅰ. 插件描述

Vim support for Liquid Types

Ⅱ. 基本信息

创建日期:  2015-02-12
使用用户:  1
Github星:  6
插件作者:  ucsd-progsys

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/ucsd-progsys/liquid-types.vim

Ⅳ. 文档说明

# liquid-types.vim

Vim support for Liquid Typing

Install

Step 1. Add the following to your .vimrc

Bundle 'scrooloose/syntastic'
Bundle 'panagosg7/vim-annotations'
let g:vim_annotations_offset = '/.liquid/'

Step 2. Copy the following files

cp syntax/haskell.vim ~/.vimrc/syntax/haskell.vim
cp syntax/liquid.vim  ~/.vimrc/bundle/syntastic/syntax_checkers/haskell/liquid.vim

Run

  • :SyntasticCheck liquid runs liquidhaskell on the current buffer.

View

  1. Warnings will be displayed in the usual error buffer.
  2. Inferred Types will be displayed when <F1> is pressed over an identifier.

Configure

You can configure the checker in various ways in your .vimrc.

  • To run after each save, for all Haskell files, add:
let g:syntastic_mode_map = { 'mode': 'active' }
let g:syntastic_haskell_checkers = ['hdevtools', 'hlint', 'liquid']
  • To pass extra options to liquidhaskell add:
let g:syntastic_haskell_liquid_args = "--diff"

添加新评论