26
1
I have a bunch of text files in a directory and I know I'll need to edit each one indiviudaly.
I start at the commend line with
vim *.txt
which opens the files as seperate buffers in vim and leaves me looking with at the first one. I edit it - then I use ':w' to save it and ':bd' to close the buffer and move on to the next one.
This ':w:bd' to save and close the buffer feels long to me, and I suspect there's a more vim ninja way of doing it - what's the recommend way to save and close the buffer you are working on in one felt swoop?
My recomended way would be to just move to the
:next
buffer and write/close everything once your task is finished with:wqa
. This supposes that you have:set hidden
in your~/.vimrc
. – romainl – 2013-01-26T13:14:45.840