From 31f80d9c334e38e486545407ea5eb5f5cbb2f07d Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sat, 20 Oct 2018 15:35:52 +0200 Subject: Refactored a lot --- vimrc-full | 210 +++++++++++++++++++++++++------------------------------------ 1 file changed, 85 insertions(+), 125 deletions(-) diff --git a/vimrc-full b/vimrc-full index 468c505..7512908 100644 --- a/vimrc-full +++ b/vimrc-full @@ -1,4 +1,4 @@ -" vim: noai:ts=2:sw=2:sts=2 iskeyword+=\:,\!,\<,\>,\-,\& number +" vim: noai:ts=2:sw=2:sts=2 iskeyword+=\:,\<,\>,\-,\& number "======================================================================================================================= " GENERAL: @@ -64,7 +64,7 @@ if has("multi_byte") set listchars+=tab:▏\ | " set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) " set listchars+=eol:↲ | " symbols used when using :set list (which displays non-printable chars) - set listchars+=space:· | " symbols used when using :set list (which displays non-printable chars) + " set listchars+=space:· | " symbols used when using :set list (which displays non-printable chars) set showbreak+=› | " symbol used in the beginning of a wrapped line " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective) @@ -235,13 +235,15 @@ set complete+=i " scan current and included files set complete+=d " scan current and included files for defined name or macro set complete+=d | " scan current and included files for defined name or macro set complete+=i | " scan current and included files for completions +set completeopt+=noinsert | " Do not insert any text for a match until the user selects one +set completeopt+=noselect | " Do not select a completion from the menu, let the user do that set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore] set tags+=../tags " code folding... set nofoldenable | " disable folding, because we have zi to toggle foldenable :) set foldclose=all | " automatically fold, when the cursor leaves the folded area -set foldcolumn=1 | " I think I don't need this second indicator +set foldcolumn=2 | " I think I don't need this second indicator " set numberwidth=5 " set foldmethod=syntax | " foldlevel: syntax, indent, manual / foldmethod=syntax makes Vim incredible slow set foldnestmax=1 | " top level folding only @@ -250,7 +252,7 @@ set foldopen=block,hor,search | " when do we unfold? " set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\v^/[/*]\','','g') " set foldtext='⊞\ '.substitute(getline(v:foldstart),'^[\ '.printf(&cms,'').']*','','').'↵'.getline(v:foldstart+1).'↵'.getline(v:foldstart+2) " set foldtext=repeat('',indent(v:foldstart)).substitute(substitute(substitute(join(getline(v:foldstart,v:foldend)),'\\s\\s\\+\\\|\[\*\/\]','\ ','g'),'\^\\s\\+','','g'),\ '\\s\\s\\+',\ '\ ',\ 'g') -set foldtext=printf('%*s%.*S',indent(v:foldstart),'',&textwidth-indent(v:foldstart),substitute(substitute(join(getline(v:foldstart,v:foldend),'\ '),'[[:space:]]\\+','\ ','g'),'^[[:space:]]','','g')) +set foldtext=printf('%*s%.*S',indent(v:foldstart),'',&textwidth-indent(v:foldstart),substitute(substitute(join(getline(v:foldstart,v:foldend),'\ '),'[[:space:]]\\+','\ ','g'),'^[[:space:]*]','','g')) " works ... " set foldexpr=match(synIDattr(synID(v:lnum,indent(v:lnum)+1,0),'name'),'Comment')>-1 @@ -403,7 +405,7 @@ if has("autocmd") autocmd FileType c,cpp set grepformat=%f:%l:%c:%m endif - autocmd BufWinEnter * if &previewwindow | setlocal nonumber signcolumn=no filetype=c nobuflisted | endif + autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif " autocmd FileType c,cpp setlocal iskeyword-=_ @@ -704,12 +706,12 @@ let g:signify_cursorhold_insert = 0 let g:signify_cursorhold_normal = 0 let g:signify_update_on_bufenter = 0 let g:signify_update_on_focusgained = 0 -let g:signify_sign_show_count = 1 +let g:signify_sign_show_count = 0 -let g:signify_sign_add = '≫' -let g:signify_sign_delete = '≪' -let g:signify_sign_delete_first_line = '≪' -let g:signify_sign_change = '≶' +let g:signify_sign_add = '➕' +let g:signify_sign_delete = '➖' +let g:signify_sign_delete_first_line = '➖' +let g:signify_sign_change = '❗' let g:signify_sign_changedelete = g:signify_sign_change @@ -742,8 +744,6 @@ nnoremap " autocmd bufenter * " \ if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " - - " map CTRL-PageUp/Down to next/previous buffer " and Shift-PageUp/Down to next/previous arglist file nnoremap :bn @@ -751,21 +751,6 @@ nnoremap :bp nnoremap :N nnoremap :n - -" Additional: ========================================. -" Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages -" let g:javascript_conceal_function = "ƒ" -" let g:javascript_conceal_null = "ø" -" let g:javascript_conceal_this = "@" -" let g:javascript_conceal_return = "⇚" -" let g:javascript_conceal_undefined = "¿" -" let g:javascript_conceal_NaN = "ℕ" -" let g:javascript_conceal_prototype = "¶" -" let g:javascript_conceal_static = "•" -" let g:javascript_conceal_super = "Ω" -" let g:javascript_conceal_arrow_function = "⇒" - - " indent within