Plug 'rust-lang/rust.vim'
Plug 'phildawes/racer'
Plug 'whatyouhide/vim-gotham'
+"Plug 'tpope/vim-repeat' | Plug 'svermeulen/vim-easyclip'
call plug#end()
call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace()<CR>
-" Save a file as root (,W)
-noremap <leader>W :w !sudo tee % > /dev/null<CR>
+" Save a file as root (,w)
+noremap <leader>w :w !sudo tee % > /dev/null<CR>
" Automatic commands
if has("autocmd")
":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
"
" change cursor shape based on mode
-let &t_SI = "\<Esc>]50;CursorShape=1\x7"
-let &t_EI = "\<Esc>]50;CursorShape=0\x7"
+if &term =~ "xterm\\|rxvt"
+ " use a solid vertical bar in insert mode
+ let &t_SI .= "\<Esc>[6 q"
+ " use a solid block otherwise
+ let &t_EI .= "\<Esc>[2 q"
+endif
+" eliminite the delay when switching modes
+set ttimeoutlen=0
set pastetoggle=<leader>p
set hidden
let g:racer_cmd = "racer"
let $RUST_SRC_PATH=expand('~/misc/rs/rust/src/')
+
+noremap \ :q<CR>
+