sbt-vim


Ⅰ. 插件描述

A plugin for using sbt from within Vim

Ⅱ. 基本信息

创建日期:  2012-05-26
使用用户:  72
Github星:  35
插件作者:  Karl Voelker

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

SBT-Vim Bridge

This is a Vim plugin that allows sbt to
be used from within Vim.

Please email me if you have questions.

Dependencies

  • Vim, compiled with support for Python 2 or 3 (check with vim --version | grep -F +python)
  • SBT on your $PATH (check with which sbt)

Mac Homebrew users: if your Vim was built against Homebrew's Python, it probably won't work. To fix this:

brew unlink python
brew uninstall vim
brew install homebrew/dupes/vim
brew link python

Installation

If you use Pathogen, just clone this
repository in your bundle directory:

git clone https://ktvoelker@github.com/ktvoelker/sbt-vim.git ~/.vim/bundle/sbt-vim

Otherwise, you will need to copy some files:

mkdir -p ~/.vim/plugin ~/.vim/python
git clone https://ktvoelker@github.com/ktvoelker/sbt-vim.git
cd sbt-vim
cp plugin/* ~/.vim/plugin/
cp python/* ~/.vim/python/

Usage

To compile:

:sbtc

This puts you into Vim's
quickfix mode, where you
can jump between compilation errors with :cn and :cp.

The first time you compile, an interactive sbt session will be created in the

  1. This can be slow, but subsequent compiles will be faster.

You can also run your tests:

:sbtt

If there are any test failures, you will be shown the list of failures in a new
buffer named sbt-vim-test that you can delete any time.

Advanced Usage

:py sbt_init()

This will start the background SBT session without executing any SBT commands.

:py sbt_close()

This will end the background session.

添加新评论