X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/39d7f74f37c473160306e750a3e0f95ea27c65d5..5052ea511bab91fcbc887f1d5057752e4f59d05a:/etc/vim/.vimrc diff --git a/etc/vim/.vimrc b/etc/vim/.vimrc index 6ad6135..c782aef 100644 --- a/etc/vim/.vimrc +++ b/etc/vim/.vimrc @@ -48,6 +48,7 @@ endif unlet x unlet y + """ vim-only defaults if !has('nvim') " neovim defaults are already set @@ -66,6 +67,15 @@ if !has('nvim') autocmd BufRead * set autoindent endif + +""" package config +"" suda +" https://github.com/lambdalisue/vim-suda/issues/32#issuecomment-829608925 +if ! &diff + let g:suda_smart_edit = 1 +endif + + """ styling " nice default theme colorscheme murphy @@ -77,10 +87,10 @@ autocmd VimEnter,WinNew * set cursorline " unique highlighting for leading spaces and in-line spaces " NOTE: this leaves tabs and other special whitespace untouched intentionally -autocmd VimEnter,ColorScheme * highlight Space ctermfg=Grey guifg=#686868 -autocmd VimEnter,ColorScheme * highlight link SpaceLeading NonText -autocmd VimEnter,WinNew * match Space / / -autocmd VimEnter,WinNew * 2match SpaceLeading /\(^ \+\)\|\( \+$\)/ +autocmd VimEnter,ColorScheme * highlight SpaceInner ctermfg=Grey guifg=#686868 +autocmd VimEnter,ColorScheme * highlight link SpaceOuter NonText +autocmd VimEnter,WinNew * match SpaceInner / / +autocmd VimEnter,WinNew * 2match SpaceOuter /\(^ \+\)\|\( \+$\)/ " always show statusline set laststatus=2 @@ -113,10 +123,16 @@ autocmd VimEnter,WinNew, autocmd VimEnter,WinNew * set list set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■ + """ editor " always save undo file for all file buffers autocmd BufRead * set undofile +" explicitly use modeline, even on systems where it's disabled by system vimrc +autocmd BufRead * set modeline +" should be default disabled but just in case +set nomodelineexpr + "" indent " always use shiftwidth instead of tabsize set smarttab @@ -129,7 +145,7 @@ autocmd FileType html set softtabstop=2 shiftwidth=2 expandtab let g:EditorConfig_enable_for_new_buf = 1 "" syntax -autocmd FileType todo set colorcolumn=0 +autocmd Syntax php syn clear phpHereDoc phpNowDoc "" mappings " use more accessible escapes, as C-n and C-o are shadowed by some terminals