vimrc/ftplugin/java.vim

17 lines
545 B
VimL
Raw Normal View History

let g:JavaImpDataDir = $HOME . "/.vim/JavaImp"
" F7 to call clean redundant Java imports and sort them
function JavaImpClean()
%!~/bin/clean_imports.sh %
:JavaImpSort
endfunction
:command JavaImpClean exec JavaImpClean()
:nnoremap <F7> :JavaImpClean<CR>
"let makeprg = 'java -cp /opt/boxen/homebrew/opt/checkstyle/libexec/checkstyle-6.0-all.jar -c '. vimrc_git . '/checkstyle.xml %:p'
let makeprg = 'checkstyle -c '. vimrc_git . '/checkstyle.xml ./%'
let &makeprg=escape(makeprg, ' ')
setlocal errorformat=%f:%l:\ %m,%f:%l:%v:\ %m,%-G%.%#