X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/dc1f43cbe4a91b6ea75c29b0b7eb158ca8f99d0b..2c667b7e7c82481b11b03d111ce0a81f9b4ca701:/vim/.vimrc?ds=sidebyside diff --git a/vim/.vimrc b/vim/.vimrc index 58f3b17..7b64c49 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -104,10 +104,10 @@ set title " Show the (partial) command as it’s being typed set showcmd " Use relative line numbers -if exists("&relativenumber") - set relativenumber - au BufReadPost * set relativenumber -endif +"if exists("&relativenumber") + "set relativenumber + "au BufReadPost * set relativenumber +"endif " Start scrolling three lines before the horizontal window border set scrolloff=3 @@ -120,8 +120,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") @@ -140,15 +140,6 @@ endif vnoremap ; : vnoremap : ; -" relative line number stuff -function! NumberToggle() - if(&relativenumber == 1) - set number - else - set relativenumber - endif -endfunc -nnoremap n :call NumberToggle() ":au FocusLost * :set number ":au FocusGained * :set relativenumber autocmd InsertEnter * :set number @@ -233,8 +224,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