diff options
Diffstat (limited to 'vimrc-full')
-rw-r--r-- | vimrc-full | 62 |
1 files changed, 41 insertions, 21 deletions
@@ -80,11 +80,6 @@ set spelllang=en,de | " languages for the spell checker | |||
80 | set spellsuggest=10 | " how many words will z= suggest? | 80 | set spellsuggest=10 | " how many words will z= suggest? |
81 | set thesaurus+=~/.vim/thesaurus/php.txt | 81 | set thesaurus+=~/.vim/thesaurus/php.txt |
82 | 82 | ||
83 | set dictionary=/usr/share/dict/cracklib-small | ||
84 | set complete+=k " make default completer <C-N> respect the dictionary | ||
85 | set complete+=i " scan current and included files | ||
86 | set complete+=d " scan current and included files for defined name or macro | ||
87 | |||
88 | "======================================================================================================================= | 83 | "======================================================================================================================= |
89 | " cscope | 84 | " cscope |
90 | "======================================================================================================================= | 85 | "======================================================================================================================= |
@@ -224,6 +219,11 @@ set wildmenu | " use a menu in the command line | |||
224 | set wildmode=longest:full | " do not preselect any entry and show all possible | 219 | set wildmode=longest:full | " do not preselect any entry and show all possible |
225 | 220 | ||
226 | " code completion | 221 | " code completion |
222 | " set dictionary=/usr/share/dict/cracklib-small | ||
223 | " set complete+=k " make default completer <C-N> respect the dictionary | ||
224 | set complete-=u " scan current and included files | ||
225 | set complete+=i " scan current and included files | ||
226 | set complete+=d " scan current and included files for defined name or macro | ||
227 | set complete+=d | " scan current and included files for defined name or macro | 227 | set complete+=d | " scan current and included files for defined name or macro |
228 | set complete+=i | " scan current and included files for completions | 228 | set complete+=i | " scan current and included files for completions |
229 | set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore] | 229 | set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore] |
@@ -742,10 +742,26 @@ nnoremap <F9> :TagbarToggle<CR>| " bind TagBar to hotkey F9 | |||
742 | 742 | ||
743 | 743 | ||
744 | " LIGHTLINE: a fancy status line ======================================================================================= | 744 | " LIGHTLINE: a fancy status line ======================================================================================= |
745 | " | ||
746 | set noshowmode | " mode will be shown twice, in lightline and below, so we want to deactivate one | ||
745 | set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split | 747 | set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split |
746 | 748 | ||
749 | set statusline= | ||
750 | set statusline+=%{(&modified?nr2char(0xF0C7):'')} | ||
751 | set statusline+=%{(&readonly\ ?\ ''\ :\ '')} | ||
752 | set statusline+=%{fnamemodify(getcwd(),':~')} | ||
753 | set statusline+=%{nr2char(0x20)} | ||
754 | set statusline+=%{nr2char(0xE0B1)} | ||
755 | set statusline+=%{nr2char(0x20)} | ||
756 | set statusline+=%f | ||
757 | set statusline+=%*%= | ||
758 | set statusline+=%l:%c(%p%%) | ||
759 | " set statusline+=%t%m | ||
760 | " set statusline+=%{TagInStatusLine()} | ||
761 | " set statusline+=%#warningmsg# | ||
762 | " set statusline+=%{SyntasticStatuslineFlag()} | ||
763 | |||
747 | Plug 'itchyny/lightline.vim' | 764 | Plug 'itchyny/lightline.vim' |
748 | " Plug 'taohex/lightline-buffer' | ||
749 | 765 | ||
750 | " lightline-buffer ui settings | 766 | " lightline-buffer ui settings |
751 | " replace these symbols with ASCII characters if your environment does not support unicode | 767 | " replace these symbols with ASCII characters if your environment does not support unicode |
@@ -776,7 +792,7 @@ let g:lightline = { | |||
776 | \ 'left': [ [ 'servername', 'sessionname' ] ], | 792 | \ 'left': [ [ 'servername', 'sessionname' ] ], |
777 | \ 'right': [ [], ['gitbranch', 'tabnumber'] ], | 793 | \ 'right': [ [], ['gitbranch', 'tabnumber'] ], |
778 | \ }, | 794 | \ }, |
779 | \ 'colorscheme': 'Tomorrow', | 795 | \ 'colorscheme': 'Tomorrow_Night', |
780 | \ 'separator': { 'left': "\uE0B4", 'right': "\uE0B6" }, | 796 | \ 'separator': { 'left': "\uE0B4", 'right': "\uE0B6" }, |
781 | \ 'subseparator': { 'left': "\uE0b1", 'right': "\uE0b3" }, | 797 | \ 'subseparator': { 'left': "\uE0b1", 'right': "\uE0b3" }, |
782 | \ 'inactive': { | 798 | \ 'inactive': { |
@@ -784,7 +800,7 @@ let g:lightline = { | |||
784 | \ 'right': [] | 800 | \ 'right': [] |
785 | \ }, | 801 | \ }, |
786 | \ 'active': { | 802 | \ 'active': { |
787 | \ 'left': [ [ 'mode', 'register', 'paste' ], [ 'pwd', 'relativepath', 'title' ] , ['tagbar']], | 803 | \ 'left': [ [ 'mode', 'register', 'paste' ], [ 'pwd', 'relativepath' ] , ['tagbar']], |
788 | \ 'right': [ [ 'lineinfo', 'percent' ], [ 'filetype', 'readonly', 'spell', 'fileencoding', 'fileformat' ] ] | 804 | \ 'right': [ [ 'lineinfo', 'percent' ], [ 'filetype', 'readonly', 'spell', 'fileencoding', 'fileformat' ] ] |
789 | \ }, | 805 | \ }, |
790 | \ 'component': { | 806 | \ 'component': { |
@@ -799,7 +815,7 @@ let g:lightline = { | |||
799 | \ 'readonly': '%{&readonly ? "" : ""}', | 815 | \ 'readonly': '%{&readonly ? "" : ""}', |
800 | \ 'register': '%{v:register}', | 816 | \ 'register': '%{v:register}', |
801 | \ 'title': '%{getwinvar(0, "quickfix_title")}', | 817 | \ 'title': '%{getwinvar(0, "quickfix_title")}', |
802 | \ 'pwd': '%{getcwd()}', | 818 | \ 'pwd': '%{fnamemodify(getcwd(), ":~")}', |
803 | \ 'relativepath': '%{fnamemodify(expand("%"), ":.")}' | 819 | \ 'relativepath': '%{fnamemodify(expand("%"), ":.")}' |
804 | \ }, | 820 | \ }, |
805 | \ 'component_expand': { | 821 | \ 'component_expand': { |
@@ -813,14 +829,6 @@ let g:lightline = { | |||
813 | \ }, | 829 | \ }, |
814 | \ } | 830 | \ } |
815 | 831 | ||
816 | set noshowmode | " mode will be shown twice, in lightline and below, so we want to deactivate one | ||
817 | " set statusline= | ||
818 | " set statusline+=%t%m | ||
819 | " set statusline+=%{TagInStatusLine()} | ||
820 | " set statusline+=%#warningmsg# | ||
821 | " set statusline+=%{SyntasticStatuslineFlag()} | ||
822 | " set statusline+=%*%= | ||
823 | " set statusline+=%l:%c(%p%%) | ||
824 | 832 | ||
825 | " Autocompleter: ===================================== | 833 | " Autocompleter: ===================================== |
826 | if has("python") | 834 | if has("python") |
@@ -855,20 +863,30 @@ if has("python") | |||
855 | 863 | ||
856 | " Plug 'Rip-Rip/clang_complete' | 864 | " Plug 'Rip-Rip/clang_complete' |
857 | " Plug 'tweekmonster/deoplete-clang2' | 865 | " Plug 'tweekmonster/deoplete-clang2' |
858 | Plug 'zchee/deoplete-clang' | 866 | " Plug 'zchee/deoplete-clang' |
859 | let g:deoplete#sources#clang#libclang_path = "/usr/lib/libclang.so" | 867 | " let g:deoplete#sources#clang#libclang_path = "/usr/lib/libclang.so" |
860 | let g:deoplete#sources#clang#clang_header = "/usr/lib/clang/6.0.0/" | 868 | " let g:deoplete#sources#clang#clang_header = "/usr/lib/clang/6.0.0" |
869 | " let g:deoplete#sources#clang#std#cpp = 'c++1z' | ||
861 | " let g:deoplete#sources#clang#clang_complete_database = "/home/max/src" | 870 | " let g:deoplete#sources#clang#clang_complete_database = "/home/max/src" |
862 | " Plug 'Shougo/neoinclude.vim' " makes vim slow - unfortunatelly | 871 | " Plug 'Shougo/neoinclude.vim' " makes vim slow - unfortunatelly |
863 | 872 | ||
873 | Plug 'autozimu/LanguageClient-neovim', { | ||
874 | \ 'branch': 'next', | ||
875 | \ 'do': 'bash install.sh', | ||
876 | \ } | ||
864 | 877 | ||
878 | let g:LanguageClient_serverCommands = { | ||
879 | \ 'cpp': ['clangd'] | ||
880 | \ } | ||
865 | " Plug 'roxma/nvim-completion-manager' unmaintained python version | 881 | " Plug 'roxma/nvim-completion-manager' unmaintained python version |
866 | else | 882 | else |
867 | Plug 'idanarye/vim-vebugger' | 883 | Plug 'idanarye/vim-vebugger' |
868 | 884 | ||
869 | " YouCompleteMe: ===================================================================================================== | 885 | " YouCompleteMe: ===================================================================================================== |
870 | " Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... | 886 | " Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... |
871 | Plug 'Valloric/YouCompleteMe' | 887 | Plug 'Valloric/YouCompleteMe', { |
888 | \ 'do' : 'python install.py --clang-completer', | ||
889 | \ } | ||
872 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar/sign column | 890 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar/sign column |
873 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar/sign coloumn | 891 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar/sign coloumn |
874 | 892 | ||
@@ -969,6 +987,7 @@ command BufToArg :argadd %:. | |||
969 | 987 | ||
970 | "======================================================================================================================= | 988 | "======================================================================================================================= |
971 | call plug#end() | " all plugins are getting loaded on this line, don't remove! | 989 | call plug#end() | " all plugins are getting loaded on this line, don't remove! |
990 | |||
972 | " ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | 991 | " ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |
973 | " END: LOADING PLUGINS | 992 | " END: LOADING PLUGINS |
974 | " ====================================================================================================================== | 993 | " ====================================================================================================================== |
@@ -1095,6 +1114,7 @@ endif | |||
1095 | " CONVENIENCE: | 1114 | " CONVENIENCE: |
1096 | " ====================================================================================================================== | 1115 | " ====================================================================================================================== |
1097 | if empty(argv()) | 1116 | if empty(argv()) |
1117 | |||
1098 | " autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val})) | 1118 | " autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val})) |
1099 | 1119 | ||
1100 | " from the list of recent files: make absolute paths, filter out files not | 1120 | " from the list of recent files: make absolute paths, filter out files not |