Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
As an example.
" Ctrl-Enter: force save file
nnoremap <silent> <C-Enter> :<C-u>write!<CR>
" Shift-Enter: force save file when buffer was changed
nnoremap <silent> <S-Enter> :<C-u>update!<CR>
" Ctrl-s: force save file
inoremap <silent> <C-s> <Esc> :write!<CR>i
<C-s>
in the terminal, add to the config: stty start undef
stty stop undef
setopt noflowcontrol
There is a great autosave plugin.
Plug '907th/vim-auto-save'
let g:auto_save = 1 " enable AutoSave on Vim startup
let g:auto_save_silent = 1 " do not display the auto-save notification
let g:auto_save_events = ["InsertLeave", "TextChanged"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question