2022-01-03 19:46:34 +00:00
|
|
|
function Sudowrite()
|
|
|
|
execute 'w !sudo tee "%"'
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
nnoremap <Leader><Leader>w :call Sudowrite()<CR><CR>L
|
2022-01-10 13:36:34 +00:00
|
|
|
|
|
|
|
function MakeFileExecutable()
|
|
|
|
execute '! chmod +x "%"'
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
nnoremap <Leader><Leader>x :call MakeFileExecutable()<CR><CR>L
|
|
|
|
|
|
|
|
" (<LEADER> + e + RC_PREFIX) for edit rc
|
|
|
|
nnoremap <Leader>ev :tabedit $WRYNVIMRC<CR>:NERDTreeToggle<CR>
|
|
|
|
nnoremap <Leader>sv :source $MYVIMRC<CR>
|
|
|
|
nnoremap <Leader>ez :tabedit $ZSHRC<CR>
|