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