X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/75905dbc2071e161e42f0240a4fc7a9e996b5d43..07deb6a0a0e8a80b69732a4546c29cabf7ba83e8:/vim/.vimrc?ds=sidebyside diff --git a/vim/.vimrc b/vim/.vimrc index f0c6919..d3784f9 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -21,6 +21,7 @@ Plug 'tpope/vim-surround' Plug 'rust-lang/rust.vim' Plug 'phildawes/racer' Plug 'whatyouhide/vim-gotham' +"Plug 'tpope/vim-repeat' | Plug 'svermeulen/vim-easyclip' call plug#end() @@ -120,8 +121,8 @@ function! StripWhitespace() call setreg('/', old_query) endfunction noremap ss :call StripWhitespace() -" Save a file as root (,W) -noremap W :w !sudo tee % > /dev/null +" Save a file as root (,w) +noremap w :w !sudo tee % > /dev/null " Automatic commands if has("autocmd") @@ -142,9 +143,9 @@ endif ":au FocusLost * :set number ":au FocusGained * :set relativenumber -autocmd InsertEnter * :set number -autocmd InsertEnter * :set norelativenumber -autocmd InsertLeave * :set relativenumber +"autocmd InsertEnter * :set number +"autocmd InsertEnter * :set norelativenumber +"autocmd InsertLeave * :set relativenumber "autocmd InsertLeave * :set nonumber " Rainbow Parantheses @@ -224,8 +225,14 @@ let g:indentLine_char = '¦' " " change cursor shape based on mode -let &t_SI = "\]50;CursorShape=1\x7" -let &t_EI = "\]50;CursorShape=0\x7" +if &term =~ "xterm\\|rxvt" + " use a solid vertical bar in insert mode + let &t_SI .= "\[6 q" + " use a solid block otherwise + let &t_EI .= "\[2 q" +endif +" eliminite the delay when switching modes +set ttimeoutlen=0 set pastetoggle=p @@ -238,3 +245,6 @@ let g:Tex_DefaultTargetFormat = "pdf" set hidden let g:racer_cmd = "racer" let $RUST_SRC_PATH=expand('~/misc/rs/rust/src/') + +noremap \ :q +