neovim: autosave rust source files
This commit is contained in:
parent
851851f998
commit
aac6406b9b
1 changed files with 4 additions and 0 deletions
|
|
@ -112,6 +112,10 @@
|
||||||
nmap <leader>rn <Plug>(coc-rename)
|
nmap <leader>rn <Plug>(coc-rename)
|
||||||
command! -nargs=0 Sw w !doas tee % > /dev/null
|
command! -nargs=0 Sw w !doas tee % > /dev/null
|
||||||
|
|
||||||
|
" autosave rust source files on change
|
||||||
|
au FileType rust inoremap <silent><esc> <esc>:update<cr>
|
||||||
|
au TextChanged,FocusLost,BufEnter *.rs silent update
|
||||||
|
|
||||||
" disable read-only warning
|
" disable read-only warning
|
||||||
au BufEnter * set noro
|
au BufEnter * set noro
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue