Browse Source

Save use sudo

pull/4/head
Ein Verne 5 years ago
parent
commit
ed6d9e9a52
  1. 4
      .vim/startup/map_vimrc

4
.vim/startup/map_vimrc

@ -52,6 +52,10 @@ vnoremap <A-k> :m '<-2<CR>gv=gv
" 空格关闭高亮,清空所有已经显示 " 空格关闭高亮,清空所有已经显示
nnoremap <Space> :set hlsearch! hlsearch?<CR> nnoremap <Space> :set hlsearch! hlsearch?<CR>
" sudo write
" https://catonmat.net/sudo-vim
cnoremap sudow w !sudo tee % >/dev/null
set hidden " 避免必须保存修改才可以跳转 buffer set hidden " 避免必须保存修改才可以跳转 buffer
" buffer " buffer
"nmap <leader>n :bnext<CR> "nmap <leader>n :bnext<CR>

Loading…
Cancel
Save