" 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
vnoremap ; :
vnoremap : ;
-" relative line number stuff
-function! NumberToggle()
- if(&relativenumber == 1)
- set number
- else
- set relativenumber
- endif
-endfunc
-nnoremap <leader>n :call NumberToggle()<cr>
":au FocusLost * :set number
":au FocusGained * :set relativenumber
autocmd InsertEnter * :set number
"
" 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