vimrc: add WW cmd
remap sudo write cmd to be WW, as hitting just W (instead of w) inadvertently is easy enough and often leads to undesired calls to sudo, which should be harder to do with the WW one. in the meanwhile, map W to just write normally.
This commit is contained in:
parent
07a2dae198
commit
83cd8a1a55
@ -526,7 +526,8 @@ map gp :bp<cr>
|
||||
"""autocmd VimLeave * silent !echo -ne "\033]112\007"
|
||||
|
||||
|
||||
command! W execute 'silent w !sudo tee % >/dev/null' | edit!
|
||||
command! W execute 'w' | edit!
|
||||
command! WW execute 'silent w !sudo tee % >/dev/null' | edit!
|
||||
command! -nargs=* Make write | make! <args> | cwindow
|
||||
command Note execute 'e ~/Sync/notes/' . strftime('%y-%m-%d-%H:%M:%S') . '.md'
|
||||
command LocalNote execute 'e ./' . strftime('%y-%m-%d-%H:%M:%S') . '.md'
|
||||
|
Loading…
Reference in New Issue
Block a user