Ⅰ. 插件描述
Vim SBT integrationⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'todesking/qf-sbt-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'todesking/qf-sbt-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'todesking/qf-sbt-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/todesking/qf_sbt.vim
Ⅳ. 文档说明
# qf_sbt.vim: SBT Vim integration
Current status
Works well, poorly documented.
Features
- Async execution
- Set error/warnings to quickfix
- SBT processes are managed by vim
- SBT plugin not needed.
Dependency
Usage
Commands
All operations are based on current buffer's project root.
SbtStartSbtStopSbtCleanSbtRestartSbtLogSbtListSbtSetQf
Vimrc example
function! Vimrc_build_status() abort " {{{
let proc = qf_sbt#get_proc()
if empty(proc) " sbt not started
return ''
elseif !qf_sbt#is_valid(proc) " sbt started, but died unexpectedly.
return '(>_<)'
else
" throttle for prevent too many updates
if !exists('b:vimrc_build_status_last_updated')
let b:vimrc_build_status_last_updated = reltime()
endif
if str2float(reltimestr(reltime(b:vimrc_build_status_last_updated))) > 0.5
let build_number = proc.last_build_number
call proc.update()
if build_number < proc.last_build_number
call proc.set_qf() " Set build result to quickfix
endif
let b:vimrc_build_status_last_updated = reltime()
endif
return proc.build_status_string
endif
endfunction " }}}
set statusline='... %{Vimrc_build_status()} ...'Related plugin
- The plugin provides similar functions(Update quickfix from sbt compile result).
- It use sbt plugin to generate compile result, then update quickfix with
clientserverfeature. - Need sbt plugin
- No async feature
- Need python