projects
/
~bandali
/
configs
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[vim] save file as root with <leader>w
[~bandali/configs]
/
vim
/
.vimrc
diff --git
a/vim/.vimrc
b/vim/.vimrc
index
f0c6919
..
7b64c49
100644
(file)
--- a/
vim/.vimrc
+++ b/
vim/.vimrc
@@
-120,8
+120,8
@@
function! StripWhitespace()
call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace()<CR>
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")
" Automatic commands
if has("autocmd")
@@
-224,8
+224,14
@@
let g:indentLine_char = '¦'
"
" change cursor shape based on mode
"
" 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 pastetoggle=<leader>p