Created
April 9, 2014 03:24
-
-
Save raa0121/10223333 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:save_cpo = &cpo | |
set cpo&vim | |
let s:V = vital#of('unite_sbtimport') | |
let s:List = s:V.import('Data.List') | |
let s:File = s:V.import('System.File') | |
let s:Cache = s:V.import('System.Cache') | |
let s:ProMan = s:V.import('ProcessManager') | |
function! sbtimport#start_sbt() | |
call s:ProMan.touch('sbt', 'sbt') | |
endfunction | |
function! sbtimport#check_libraryDependencies() "{{{ | |
let t = s:ProMan.touch('sbt', 'sbt') | |
if t ==# 'new' | |
call s:ProMan.writeln('sbt', 'show libraryDependencies') | |
let temp = s:ProMan.read_wait('sbt', 3.0, ["> "]) | |
else | |
call s:ProMan.writeln('sbt', 'show libraryDependencies') | |
endif | |
" call s:ProMan.writeln('sbt', 'show thisProject') | |
let temp = s:ProMan.read('sbt', ["> "]) | |
echomsg string(temp) | |
let libDepend = split(matchstr(temp[0], 'List(\zs.\{-}\ze)'), ',') | |
if libDepend == [] | |
let libDepend = split(matchstr(temp[0], 'List(\zs.\{-}\ze)'), ',') | |
endif | |
return libDepend | |
" return s:ProMan.read('sbt', ["> "])[0] | |
endfunction "}}} | |
if exists('g:sbtimport_enable_at_startup') && g:sbtimport_enable_at_startup == 1 | |
if filereadable(expand('%p:h') . '/build.sbt') | |
call sbtimport#start_sbt() | |
echomsg 'startup!' | |
endif | |
endif | |
let &cpo = s:save_cpo | |
unlet s:save_cpo | |
" vim: foldmethod=marker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment