haskomplete.vim


Ⅰ. 插件描述

A vim ftplugin for magical contextual haskell code completions

Ⅱ. 基本信息

创建日期:  2011-04-25
使用用户:  1
Github星:  10
插件作者:  Brandon Simmons

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

A vim ftplugin for magical haskell code completions.

I hope this becomes a collaborative project. Please send me pull requests with
improvements or new completions you would like to see.

Installation

Copy the .vim file to your vim installation's ftplugin directory:

mkdir -p ~/.vim/ftplugin/
cp haskell_haskomplete.vim ~/.vim/ftplugin/

the functionality should automatically load when you open a haskell source code
file.

Usage

In insert or normal modes, press <CTRL-H>. If your cursor is in a context that
has an assigned completion (see below) some magic completion action will occur.

Implemented Completions

Below the cursor in insert mode looks like ^, in normal mode it looks like #.
When the cursor is ommited on the left hand side, assume the cursor is in insert
mode anywhere on the line shown:

Insert mode

create skeleton implementation of term(s) during type declaration:

func1, func2           --->   func1, func2 :: ^
                              func1 = undefined
                              func2 = undefined

Prepare a class restriction in a type signature line

func ::                --->   func :: (^)=>

Create an arrow in a type signature:

func :: Type           --->   func :: Type -> ^

Fill in 'undefined' in a function definition:

func x y               --->   func x y = #undefined
func  =                --->   func = #undefined

Normal mode

...todo

添加新评论