0
votes
2answers
126 views

vim - Autosave file to disk, efficiently

I keep a log file, and want it to be written to disk without having to manually save it after every edit. I've used the :au! CursorHoldI,CursorHold <buffer> silent! :update command that I found ...
3
votes
2answers
151 views

Open vim then save and close automatically

Using bash is it possible to open a file in vim and then automatically save and close e.g. "ZZ" | vim my.file.txt obviously the above isn't going to work, but how would I do the equivalent? - I ...
3
votes
1answer
175 views

When editing an existing file with VIM: will it replace or change that file?

I've read that most editors will replace the file when you actually want to save changes to that file How to execute a command whenever a file changes?. So how does VIM behave?
0
votes
1answer
685 views

Map escape+s to save file in vim

I want a shortcut to save the current file in Vim. I want to map escape+s to :w. I tried :map <esc-s> :w but it doesnt work.