Tip 38: Manage Hidden Files
Return to the top: <<Practical Vim>>
Command | Effect |
:w[rite]
|
Write the contents of the buffer to disk |
:e[dit]!
|
Read the file from disk back into the buffer (that is, revert changes) |
:qa[ll]!
|
Close all windows, discarding changers without warning |
:wa[ll]
|
Write all modified buffers to disk |
Enable the 'hidden' Setting Before Running :argdo
or :bufdo
-
If we enable the 'hidden' setting, then we can use the
:next
/:bnext
/:cnext
commands without a trailing bang. -
After running
:argdo {cmd}
,-
check buffers one by one:
:first
,:wn
, etc. -
save all buffers:
:argdo write
or:wall
-
check buffers one by one:
References:
# If you open the file in vim, # then you can \"ayy@a the next line to execute the vim command: :h 'hidden'