mc-stan.vim


Ⅰ. 插件描述

vim plugin for stan bayesian modeling language

Ⅱ. 基本信息

创建日期:  2013-09-28
使用用户:  1
Github星:  2
插件作者:  Michael Lerch

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

mc-stan.vim

Filetype

*.stan files are matched as stan files.

Syntax

Extensive syntax matching for distributions, functions, operators, and more.

Indentation

Take advantage of cindent for indentation of stan files.

Snippets

A rich suite of Ultisnip snippets for building stan models.
stan snippets follow a pattern of stan_*.
If you use a completer like YouCompleteMe, you can see all the snippets available just by typing stan_
Snippets exist for a bare stan skeleton, traditional examples, and different classic models.
Snippets are also provided for the R filetypes for use with Rstan.

Available snippets:

  • stan_linearmodel (stan and R) basic linear model with Gaussian errors
  • stan_bernoulli (stan and R) basic linear model for Bernoulli response.
  • stan_binomial (stan and R) basic linear model for Binomial response.
  • stan_example_rats (stan) the classic "Rats" example
  • stan_example_schools (stan) the classic "8 schools" example
  • stan_skeleton (stan) setup of the different blocks (data, parameters, etc)
  • stan (R) R code to build a model, sample, and extract

添加新评论