Friday, April 14, 2017

Re: bufdo reload and go to end of file

On Friday, April 14, 2017 at 6:57:03 PM UTC+2, Ben Fritz wrote:

> Back on-topic: when you say you "have a bunch of files open", are they all in buffers that you are switching between in a single window? Or do you have them open in multiple windows? What happens when you run your command? What did you expect to happen instead?

they are in buffers in the same windows, a "bunch" i meant 3-4 split horizontally. When i run the command only the buffer that happened to have the cursor in it (the active buffer?) is positioned at the end of the file. All of them are reloaded though. What I expected to happen is all files to be refreshed with all buffers showing the last couple of lines of each file.

>
> I would expect your command to end with the last buffer loaded in your window, with the cursor at the end. If you have appropriate autocmds defined, switching back to another buffer in the same window would have the cursor on the last line, however without a "restore last position" autocmd it would probably just go back to the beginning of the file. The 'hidden' option may help there, I'm not 100% sure.

I did try the hidden option. did not seem to make a difference. Note that when i open the files in tabs and do the same with :tabdo everything works fine.

I will read up on autocmds, still ascending on the learning curve :-)

Thanks for the help!
Jorg

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: