tags:

views:

70

answers:

3

I realized that in gvim Control+S as the :update command. I always save using Ctrl+S, so I assume that :update is another way of saying "refresh the changes." Is :update basically the same as write :w? Will I have problems if I replace :update for :w!?

edit: I wanted to change :update to :w! becauase I have a file that says "ready-only please add !." And I thought this was the only solution

+2  A: 

From the help:

:[range]up[date][!] [++opt] [>>] [file]
                        Like ":write", but only write when the buffer has been
                        modified.  {not in Vi}
Pascal Thivent
+1  A: 

:help :update says:

Like ":write", but only write when the buffer has been modified.

Miel
+4  A: 

:help :update is pretty clear on that:

Like ":write", but only write when the buffer has been modified.

So the file will only written if the contents of the buffer have actually been changed. So if you use :update (or press Ctrl+S in GVim) and there are no unsaved changes in the buffer, it won't do anything.

jkramer