Skip to content

Commit

Permalink
Update vimrc
Browse files Browse the repository at this point in the history
修改了 issue wklken#138 中提到的地方,优化了强制写入的命令
  • Loading branch information
the-eric-kwok authored Oct 17, 2018
1 parent aec59f7 commit aeef268
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ nnoremap <silent> <Leader>z :ZoomToggle<CR>

" Go to home and end using capitalized directions
" 使用 H、L 跳转到行首和行尾
noremap H ^
noremap L $
Expand Down Expand Up @@ -528,8 +529,9 @@ nnoremap gv `[v`]
" select block
nnoremap <leader>v V`}
" w!! to sudo & write a file
cmap w!! w !sudo tee >/dev/null %
" W: to sudo & write a file
" 使用 W: 命令来强制使用管理员权限写入文件
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!

" kj 替换 Esc
inoremap kj <Esc>
Expand Down

0 comments on commit aeef268

Please sign in to comment.