aboutsummaryrefslogtreecommitdiff
path: root/TMV/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'TMV/.vimrc')
-rw-r--r--TMV/.vimrc55
1 files changed, 51 insertions, 4 deletions
diff --git a/TMV/.vimrc b/TMV/.vimrc
index 3af97f7..3896408 100644
--- a/TMV/.vimrc
+++ b/TMV/.vimrc
@@ -1,4 +1,4 @@
-let mapleader =","
+let mapleader ='\'
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..."
@@ -96,8 +96,55 @@ set clipboard=unnamedplus
autocmd BufWritePost *Xresources,*Xdefaults !xrdb %
" Update binds when sxhkdrc is updated.
autocmd BufWritePost *sxhkdrc !pkill -USR1 sxhkd
-" Update dwmbar when changed.
- autocmd BufWritePost *dwmbar !killall dwmbar; setsid dwmbar &
-colo torte
+ call plug#begin('~/.vim/plugged')
+ Plug 'artur-shaik/vim-javacomplete2'
+ call plug#end()
+
+ colorscheme delek
+
+" Java autocompletion
+ autocmd FileType java setlocal omnifunc=javacomplete#Complete
+ nmap <F4> <Plug>(JavaComplete-Imports-AddSmart)
+ imap <F4> <Plug>(JavaComplete-Imports-AddSmart)
+ nmap <F5> <Plug>(JavaComplete-Imports-Add)
+ imap <F5> <Plug>(JavaComplete-Imports-Add)
+ nmap <F6> <Plug>(JavaComplete-Imports-AddMissing)
+ imap <F6> <Plug>(JavaComplete-Imports-AddMissing)
+ nmap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
+ imap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
+
+ nmap <leader>jI <Plug>(JavaComplete-Imports-AddMissing)
+ nmap <leader>jR <Plug>(JavaComplete-Imports-RemoveUnused)
+ nmap <leader>ji <Plug>(JavaComplete-Imports-AddSmart)
+ nmap <leader>jii <Plug>(JavaComplete-Imports-Add)
+
+ imap <C-j>I <Plug>(JavaComplete-Imports-AddMissing)
+ imap <C-j>R <Plug>(JavaComplete-Imports-RemoveUnused)
+ imap <C-j>i <Plug>(JavaComplete-Imports-AddSmart)
+ imap <C-j>ii <Plug>(JavaComplete-Imports-Add)
+
+ nmap <leader>jM <Plug>(JavaComplete-Generate-AbstractMethods)
+
+ imap <C-j>jM <Plug>(JavaComplete-Generate-AbstractMethods)
+
+ nmap <leader>jA <Plug>(JavaComplete-Generate-Accessors)
+ nmap <leader>js <Plug>(JavaComplete-Generate-AccessorSetter)
+ nmap <leader>jg <Plug>(JavaComplete-Generate-AccessorGetter)
+ nmap <leader>ja <Plug>(JavaComplete-Generate-AccessorSetterGetter)
+ nmap <leader>jts <Plug>(JavaComplete-Generate-ToString)
+ nmap <leader>jeq <Plug>(JavaComplete-Generate-EqualsAndHashCode)
+ nmap <leader>jc <Plug>(JavaComplete-Generate-Constructor)
+ nmap <leader>jcc <Plug>(JavaComplete-Generate-DefaultConstructor)
+
+ imap <C-j>s <Plug>(JavaComplete-Generate-AccessorSetter)
+ imap <C-j>g <Plug>(JavaComplete-Generate-AccessorGetter)
+ imap <C-j>a <Plug>(JavaComplete-Generate-AccessorSetterGetter)
+
+ vmap <leader>js <Plug>(JavaComplete-Generate-AccessorSetter)
+ vmap <leader>jg <Plug>(JavaComplete-Generate-AccessorGetter)
+ vmap <leader>ja <Plug>(JavaComplete-Generate-AccessorSetterGetter)
+
+ nmap <silent> <buffer> <leader>jn <Plug>(JavaComplete-Generate-NewClass)
+ nmap <silent> <buffer> <leader>jN <Plug>(JavaComplete-Generate-ClassInFile)