I have two files open, say File.h and File.m in separate tabs. -----------------------------------| File.h         |  File.m        |-----------------------------------:ls reveals:ls  1 %a   File.h line 1  2  a   File.m line 0When I run :bufdo set fo=croqlI suddenly have two tabs with the same content-----------------------------------| File.m         |  File.m        |-----------------------------------but :ls gives the output:ls  1 #    File1.h line 1  2 %a   File2.m line 1I don't understand from the documentation what the # char means here, except that I can :e # to get back to the initial configuration.Can somebody elucidate what is happening here?
Why does ':bufdo set fo=*' change window contents?
buffers;multiple files
:help :bufdo explains very clearly how :bufdo works::bfirst:{cmd}:bnext:{cmd}etc.The last buffer to be visited becomes the current buffer (%), and the buffer visited just before becomes the alternate buffer (#).:tabdo doesn't care about buffers so it's most likely to be the right command for you.