X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/3bdc98f36795ebd6e83a3bf0cf52c3f24fb18262..63566c21b2e873091d0eed994bfbd501db4629f7:/vim/.vimrc?ds=inline diff --git a/vim/.vimrc b/vim/.vimrc index 8fb0035..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() @@ -104,10 +105,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 +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") @@ -140,20 +141,11 @@ 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 -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 @@ -177,8 +169,8 @@ let g:UltiSnipsJumpBackwardTrigger="" set shiftwidth=4 set expandtab -"let g:ctrlp_map = '' -let g:ctrlp_map = 'p' +let g:ctrlp_map = '' +"let g:ctrlp_map = 'p' set wildignore+=*/build/** let g:android_sdk_path= '/Applications/Android\ Studio.app/sdk/' let g:android_adb_tool= '/Applications/Android\ Studio.app/sdk/platform-tools/adb' @@ -233,10 +225,16 @@ 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=t +set pastetoggle=p "set conceallevel=0 "let g:vim_json_syntax_conceal = 0 @@ -247,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 +