aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2019-09-12 19:44:24 +0200
committerMax Christian Pohle2019-09-12 19:44:24 +0200
commita6cdae262df868ff79c32dca3b61686ef5c8e433 (patch)
tree2b2c2c08db0e63505b55e4c6a36a9a26b1fb5606
parentee9db4ec2784356bb1aa16ef52f29bead61e74ae (diff)
downloadvim-a6cdae262df868ff79c32dca3b61686ef5c8e433.tar.bz2
vim-a6cdae262df868ff79c32dca3b61686ef5c8e433.zip
Improved Java support & minor fixes
-rw-r--r--.gitmodules3
-rw-r--r--ftplugin/java.vim2
-rw-r--r--init.vim13
m---------pack/vim/opt/vimtex0
-rw-r--r--plugin/statusline.vim18
-rw-r--r--vimrc2
-rw-r--r--vimrc-common7
7 files changed, 32 insertions, 13 deletions
diff --git a/.gitmodules b/.gitmodules
index c2ca5df..4759f0d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -58,3 +58,6 @@
58[submodule "pack/vim/opt/YouCompleteMe.git"] 58[submodule "pack/vim/opt/YouCompleteMe.git"]
59 path = pack/vim/opt/YouCompleteMe 59 path = pack/vim/opt/YouCompleteMe
60 url = https://github.com/Valloric/YouCompleteMe.git 60 url = https://github.com/Valloric/YouCompleteMe.git
61[submodule "pack/vim/opt/vimtex"]
62 path = pack/vim/opt/vimtex
63 url = https://github.com/lervag/vimtex
diff --git a/ftplugin/java.vim b/ftplugin/java.vim
new file mode 100644
index 0000000..7da3e00
--- /dev/null
+++ b/ftplugin/java.vim
@@ -0,0 +1,2 @@
1set makeprg=javac\ -Xdiags:verbose\ %
2set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
diff --git a/init.vim b/init.vim
index 590f12b..402f7a6 100644
--- a/init.vim
+++ b/init.vim
@@ -44,6 +44,19 @@ augroup DEOPLETE
44 packadd deoplete.nvim 44 packadd deoplete.nvim
45 packadd LanguageClient-neovim 45 packadd LanguageClient-neovim
46 packadd echodoc.vim 46 packadd echodoc.vim
47
48 let g:deoplete#sources#clang#include_default_arguments=1
49 " suggestions in alphabetic order
50 call deoplete#custom#source('_', 'sorters', ['sorter_word'])
51 call deoplete#custom#filter('converter_reorder_attr',
52 \ 'attrs_order', {
53 \ '_': {
54 \ 'kind': [
55 \ 'Function',
56 \ 'Property'
57 \ ]
58 \ },
59 \})
47augroup END 60augroup END
48 61
49"======================================================================================================================= 62"=======================================================================================================================
diff --git a/pack/vim/opt/vimtex b/pack/vim/opt/vimtex
new file mode 160000
Subproject ae420204f1632db7c7b93007fb2e193d44061f0
diff --git a/plugin/statusline.vim b/plugin/statusline.vim
index e3c03ed..20d6b7e 100644
--- a/plugin/statusline.vim
+++ b/plugin/statusline.vim
@@ -2,19 +2,14 @@ augroup MAX_FANCYLINE
2 set noshowmode | " mode will be shown twice, in lightline and below, so we want to deactivate one 2 set noshowmode | " mode will be shown twice, in lightline and below, so we want to deactivate one
3 set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split 3 set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split
4 4
5 let g:status_sym_start = '' 5 let g:status_sym_start = ''
6 let g:status_sym_end = '' 6 let g:status_sym_end = ''
7 let g:status_sym_sep_start = '' 7 let g:status_sym_sep_start = ''
8 let g:status_sym_sep_end = '' 8 let g:status_sym_sep_end = ''
9 let g:symbol_branch = '' 9 let g:symbol_branch = ''
10 let g:symbol_screen_edge = '░'
10 11
11 if &term == "linux" 12 if &term == "linux"
12 let g:status_sym_start = ''
13 let g:status_sym_end = ''
14 let g:status_sym_sep_start = ''
15 let g:status_sym_sep_end = ''
16 let g:symbol_branch = ''
17
18 let g:group_active = "StatusLineTerm" 13 let g:group_active = "StatusLineTerm"
19 let g:group_inactive = "StatusLineTermNC" 14 let g:group_inactive = "StatusLineTermNC"
20 let g:group_tabline = "StatusLineTerm" 15 let g:group_tabline = "StatusLineTerm"
@@ -62,6 +57,7 @@ augroup MAX_FANCYLINE
62 return '' 57 return ''
63 \ ."%#StatusLineHighlight#" 58 \ ."%#StatusLineHighlight#"
64 \ ."%#".a:highlight_group."#" 59 \ ."%#".a:highlight_group."#"
60 \ .g:symbol_screen_edge.' '
65 \ ."%{(&readonly\ ?\ '\ \ 🔒'\ :\ '')}" 61 \ ."%{(&readonly\ ?\ '\ \ 🔒'\ :\ '')}"
66 \ ."%{(&modified\ ?\ '\ \ 💾'\ :\ '')}" 62 \ ."%{(&modified\ ?\ '\ \ 💾'\ :\ '')}"
67 \ ."%(%w%h%q%)".' '.l:mode.' '.g:status_sym_sep_start 63 \ ."%(%w%h%q%)".' '.l:mode.' '.g:status_sym_sep_start
@@ -83,9 +79,9 @@ augroup MAX_FANCYLINE
83 \ ."%{(&spell\ ?\ &spelllang.' '.g:status_sym_sep_end\ :\ '')}" 79 \ ."%{(&spell\ ?\ &spelllang.' '.g:status_sym_sep_end\ :\ '')}"
84 \ ."%{(&fileencoding=~'^$\\|^utf\-8$'?'':&fileencoding.' '.g:status_sym_sep_end.' ')}" 80 \ ."%{(&fileencoding=~'^$\\|^utf\-8$'?'':&fileencoding.' '.g:status_sym_sep_end.' ')}"
85 \ ."%{(&fileformat=~'^$\\|^unix$'?'':&fileformat.' '.g:status_sym_sep_end)}" 81 \ ."%{(&fileformat=~'^$\\|^unix$'?'':&fileformat.' '.g:status_sym_sep_end)}"
86 \ ."%l:%-3c" 82 \ ."%cx%-l: "
87 \ .g:status_sym_sep_end.' '
88 \ ."%p%% " 83 \ ."%p%% "
84 \ .g:symbol_screen_edge
89 endfunction 85 endfunction
90 86
91 function! UpdateTabline(highlight_group) 87 function! UpdateTabline(highlight_group)
@@ -94,6 +90,7 @@ augroup MAX_FANCYLINE
94"  90" 
95 return '' 91 return ''
96 \ ."%#".a:highlight_group."#" 92 \ ."%#".a:highlight_group."#"
93 \ .g:symbol_screen_edge
97 \ ."%3( \ %)\ " 94 \ ."%3( \ %)\ "
98 \ ."%{getcwd(-1)}\ " 95 \ ."%{getcwd(-1)}\ "
99 \ ."%{FugitiveHead()==''?'':g:status_sym_sep_start.' '.g:symbol_branch.' '.FugitiveHead().' '}" 96 \ ."%{FugitiveHead()==''?'':g:status_sym_sep_start.' '.g:symbol_branch.' '.FugitiveHead().' '}"
@@ -109,6 +106,7 @@ augroup MAX_FANCYLINE
109 \ ."%(%{v:servername}\ %{v:this_session}%)" 106 \ ."%(%{v:servername}\ %{v:this_session}%)"
110 \ .g:status_sym_sep_end.' ' 107 \ .g:status_sym_sep_end.' '
111 \ ."%(\ \ \ %{tabpagenr()}/%{tabpagenr('$')}\ %)" 108 \ ."%(\ \ \ %{tabpagenr()}/%{tabpagenr('$')}\ %)"
109 \ .g:symbol_screen_edge
112 \ ."%##" 110 \ ."%##"
113 \ ."" " end 111 \ ."" " end
114 endfunction 112 endfunction
diff --git a/vimrc b/vimrc
index cc4cae8..6f80d2f 100644
--- a/vimrc
+++ b/vimrc
@@ -12,6 +12,8 @@ set restorescreen | " restores the console after exiting vim (intentionally no
12autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") 12autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib")
13 13
14 14
15xnoremap "+y y:call system("wl-copy", @")<cr>
16
15" scripts from the default vim installation, which do not get loaded by default, but are useful. 17" scripts from the default vim installation, which do not get loaded by default, but are useful.
16if filereadable($VIMRUNTIME.'/macros/editexisting.vim') 18if filereadable($VIMRUNTIME.'/macros/editexisting.vim')
17 packadd! editexisting 19 packadd! editexisting
diff --git a/vimrc-common b/vimrc-common
index 21df101..b8900c4 100644
--- a/vimrc-common
+++ b/vimrc-common
@@ -141,12 +141,13 @@ set wildmode=longest:full | " do not preselect any entry and show all possib
141 141
142" code completion 142" code completion
143" set dictionary=/usr/share/dict/cracklib-small 143" set dictionary=/usr/share/dict/cracklib-small
144" set complete+=k " make default completer <C-N> respect the dictionary 144set complete+=d | " scan current and included files for defined name or macro
145set complete+=i | " scan current and included files for completions
146set complete+=k " make default completer <C-N> respect the dictionary
145set complete-=u " scan current and included files 147set complete-=u " scan current and included files
146set complete+=i " scan current and included files 148set complete+=i " scan current and included files
147set complete+=d " scan current and included files for defined name or macro 149set complete+=d " scan current and included files for defined name or macro
148set complete+=d | " scan current and included files for defined name or macro 150" set complete=d " scan current and included files for defined name or macro
149set complete+=i | " scan current and included files for completions
150set completeopt+=noinsert | " Do not insert any text for a match until the user selects one 151set completeopt+=noinsert | " Do not insert any text for a match until the user selects one
151set completeopt+=noselect | " Do not select a completion from the menu, let the user do that 152set completeopt+=noselect | " Do not select a completion from the menu, let the user do that
152set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore] 153set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore]
..