Tagged Questions
3
votes
2answers
88 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 ...
2
votes
1answer
101 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
274 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.