diff --git a/.vimrc b/.vimrc index 42e4c96..d6129be 100644 --- a/.vimrc +++ b/.vimrc @@ -4,11 +4,22 @@ let &t_SI = "\[6 q" let &t_SR = "\[4 q" let &t_EI = "\[2 q" +" Fix color in some environments +if exists('+termguicolors') + let &t_8f = "\[38;2;%lu;%lu;%lum" + let &t_8b = "\[48;2;%lu;%lu;%lum" + " maybe need to remove this in gnu screen + set termguicolors +endif + +" Add this if color doesn't work +" set term=xterm-256color + " Common stuff set encoding=utf-8 set exrc set undofile -set undodir=~/.vim/undofiles-vanilla +set undodir=~/.vim/undofiles-vanilla " you have to manually create this directory set undolevels=10000 set undoreload=50000 " filetype off @@ -22,7 +33,6 @@ set selectmode=key set keymodel=startsel set number set cursorline -set termguicolors set clipboard=unnamedplus " not `+=` in vim set updatetime=700 set whichwrap+=<,>,[,] @@ -93,6 +103,7 @@ Plug 'ryanoasis/vim-devicons' Plug 'airblade/vim-gitgutter' Plug 'tpope/vim-fugitive' Plug 'Yggdroot/indentLine' +Plug '907th/vim-auto-save' call plug#end() @@ -159,8 +170,8 @@ endfunction let g:asyncomplete_preprocessor = [function('s:truncate_labels')] " Personal keybindings -nnoremap h (easymotion-bd-w) -vnoremap h (easymotion-bd-w) +nnoremap w (easymotion-bd-w) +vnoremap w (easymotion-bd-w) nnoremap o Files nnoremap g Rg nnoremap gpd LspPeekDefinition @@ -180,6 +191,7 @@ vnoremap dkPV`] vnoremap >gv vnoremap ggVG +nnoremap gy `[v`] """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Bclose @@ -265,5 +277,10 @@ let g:indentLine_char = '' let g:indentLine_first_char = '' let g:indentLine_showFirstIndentLevel = 1 +" cursor word +let g:cursorword_delay = 1 + +let g:auto_save = 0 + " Why?! set noshowmode