--
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License.
See http://www.gnu.org/copyleft/gpl.txt
- Insert import
- Sort imports
- Insert package declaration
Copy this file in your vim plugin folder
No classpath or configuration needed. This plugin use the regular vim search.
So you only need a good search index (through ctags or cscope for example)
- <Leader>is Sort imports
- <Leader>ia Search class from <cword>, add it to the imports and sort imports
- <Leader>ip add or replace package declaration
- You can define the package sort order using g:sortedPackage
- You can define the package deth blank line separator using g:packageSepDepth
This plugin is an improvement of the anonymous function found here : http://vim.wikia.com/wiki/Add_Java_import_statements_automatically