purescript-vim


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2014-06-18
使用用户:  172
Github星:  123
插件作者:  PureScript Contrib

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Purescript Syntax/Indentation

Maintainer: coot

Syntax highlighting and indentation for [Purescript][] based on [idris-vim][] and [haskell-vim][].

Installation

I recommend using [Pathogen][] for installation. Simply clone
this repo into your ~/.vim/bundle directory and you are ready to go.

cd ~/.vim/bundle
git clone https://github.com/raichoo/purescript-vim.git

Manual Installation

Copy content into your ~/.vim directory (or %HOME%\vimfiles on Windows).

Be sure that the following lines are in your
.vimrc

syntax on
filetype on
filetype plugin indent on

Configuration

Indentation

To configure indentation in purescript-vim you can use the following variables:

  • let purescript_indent_if = 3

    if bool
    >>>then ...
    >>>else ...
    
  • let purescript_indent_case = 5

    case xs of
    >>>>>[]     -> ...
    >>>>>(y:ys) -> ...
    
  • let purescript_indent_let = 4

    let x = 0 in
    >>>>x
    
  • let purescript_indent_where = 6

    where f :: Int -> Int
    >>>>>>f x = x
    
  • let purescript_indent_do = 3

    
    do x <- a
    >>>y <- b
    
  • let purescript_indent_in = 1

    let x = 0

    in x

  • let purescript_indent_dot = v:true

    unsnoc
    :: forall a

    . List a
    -> Maybe (List a, a)

添加新评论