From ed6d9e9a520eee016760abadfcdcd13c596df1a9 Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Thu, 25 Jul 2019 09:13:58 +0800 Subject: [PATCH] Save use sudo --- .vim/startup/map_vimrc | 4 ++++ 1 file changed, 4 insertions(+) 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