How is it possible to save the vim file without to close it? I do a change, save it immediately and continue to work with the file without to reopen it again... I have found of course the question how do I save files edited with vim, anyway the proposed solutions close the file after the job execution.
Asked
Active
Viewed 1,695 times
0
-
This is not a duplicate, because the question was to save file without to close it. The answers in the topic above save and close the file. How to save file and close it, I knew already early :wq! – Guforu Jul 06 '16 at 09:30
-
It is now. I just updated the top answer there. – muru Jul 06 '16 at 09:58
3 Answers
5
You should hit Escape and use the write command:
:w
Enter
This will write the file to disk and keep the file open.
:wq
Enter
Will write and quit the editor.
-
1Welcome to AskUbuntu. Could you please elaborate your answer and give more context why and how (eg: this won't work if he is in insertion-mode) he needs to type? – MadMike Jul 06 '16 at 09:11
-
2
-
@fkraiem Could you please elaborate your answer and give more context as to why and how my seriousness is questionable... alright. I expanded the answer myself ;) – MadMike Jul 06 '16 at 12:09
0
You need to press escape when you opened the file using vim and made changes, then type :w to save it without closing it
0
if you want to save file in vim without exiting from vim, use this (to write):
:w
and if you want to save file and exit form vim editor, use this ( to write and quit):
:wq

karel
- 114,770