clean_imports : Makes use of the Java checkstyle tool to clean your Java file of unused imports
script karma |
Rating 4/1,
Downloaded by 872 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Paul Bourke |
|
script type |
utility |
|
description |
This is a simple bash script that can be used as a filter in vim to clean your java of unused imports.
If you have the JavaImp plugin installed (vimscript #325) you can use it in conjunction with this to also sort your imports as well as clean them.
I have been using it in my own code and it works quite nicely. See http://paulbourke.blogspot.com/2012/04/clean-your-java-imports-in-vim.html for more info. |
|
install details |
Save the script somewhere in your path such as ~/bin and then add something like the following to your .vimrc
" 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> |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.14.83
|