Change the Java unused imports behavior to use a Vim plugin installed in setup.sh.
This commit is contained in:
parent
387ea604f4
commit
a5ba51f77e
6
.vimrc
6
.vimrc
@ -71,10 +71,8 @@ let groovy_allow_cpp_keywords = 1
|
|||||||
" nmap <Leader>gs wve"tywve"py'bo
public void set "ppbvUhxA("tpA "ppA) {
this."ppA = "ppA;
}
public "tpA get "ppbvUhxA() {
return this."ppA;
}mb'a/private \w+\+ \w\+;
ma
|
" nmap <Leader>gs wve"tywve"py'bo
public void set "ppbvUhxA("tpA "ppA) {
this."ppA = "ppA;
}
public "tpA get "ppbvUhxA() {
return this."ppA;
}mb'a/private \w+\+ \w\+;
ma
|
||||||
nmap <Leader>jgs :let @t=''<CR>:let @n=''<CR>'a0v$:s/\v^\s*(private\|public\|protected)? ?(\w+(\<[^>]+\>)?) (\w+);/\=setreg('T', submatch(2))/n<CR>0v$:s/\v^\s*(private\|public\|protected)? ?(\w+(\<[^>]+\>)?) (\w+);/\=setreg('N', submatch(4))/n<CR>'bo<CR>public <ESC>"tpA get <ESC>"npbvUhxA() {<CR> return this.<ESC>"npA;<CR>}<ESC><<o<CR>public void set <ESC>"npbvUhxA(<ESC>"tpA <ESC>"npA) {<CR> this.<ESC>"npA = <ESC>"npA;<CR>}<ESC><<mb'anma
|
nmap <Leader>jgs :let @t=''<CR>:let @n=''<CR>'a0v$:s/\v^\s*(private\|public\|protected)? ?(\w+(\<[^>]+\>)?) (\w+);/\=setreg('T', submatch(2))/n<CR>0v$:s/\v^\s*(private\|public\|protected)? ?(\w+(\<[^>]+\>)?) (\w+);/\=setreg('N', submatch(4))/n<CR>'bo<CR>public <ESC>"tpA get <ESC>"npbvUhxA() {<CR> return this.<ESC>"npA;<CR>}<ESC><<o<CR>public void set <ESC>"npbvUhxA(<ESC>"tpA <ESC>"npA) {<CR> this.<ESC>"npA = <ESC>"npA;<CR>}<ESC><<mb'anma
|
||||||
|
|
||||||
" Clean un-used Java imports. Requires clean_imports.sh executable in the PATH.
|
" Clean un-used Java imports.
|
||||||
" clean_imports.sh should be a filter that reads in a filepath as the first
|
nmap <Leader>jci :UnusedImportsRemove<CR>
|
||||||
" argument and prints our the altered file contents on STDOUT.
|
|
||||||
nmap <Leader>jci :w<CR>:%!clean_imports.sh %<CR>
|
|
||||||
|
|
||||||
" Format the file using java-file-formatter. java-file-formatter should be a
|
" Format the file using java-file-formatter. java-file-formatter should be a
|
||||||
" command that takes a file path as the first argument and either alters the
|
" command that takes a file path as the first argument and either alters the
|
||||||
|
1
setup.sh
1
setup.sh
@ -20,6 +20,7 @@ git clone https://github.com/zah/nim.vim.git
|
|||||||
git clone https://github.com/tpope/vim-fugitive.git
|
git clone https://github.com/tpope/vim-fugitive.git
|
||||||
git clone https://github.com/isRuslan/vim-es6.git
|
git clone https://github.com/isRuslan/vim-es6.git
|
||||||
git clone https://github.com/airblade/vim-gitgutter.git
|
git clone https://github.com/airblade/vim-gitgutter.git
|
||||||
|
git clone https://github.com:akhaku/vim-java-unused-imports.git
|
||||||
ln -s /usr/share/lilypond/2.18.2/vim lilypond.vim
|
ln -s /usr/share/lilypond/2.18.2/vim lilypond.vim
|
||||||
|
|
||||||
# Setup ST
|
# Setup ST
|
||||||
|
Loading…
x
Reference in New Issue
Block a user