Friday, April 14, 2017

Re: bufdo reload and go to end of file

On Wednesday, April 12, 2017 at 8:18:58 PM UTC-5, Jorg Heymans wrote:
> Hi,
>
> I have a bunch of files open and I would like to refresh them all and jump to end of file. I tried various variations on:
>
> :bufdo e|normal G
>
> Can someone enlighten me on the correct syntax ? I'm using gvim 7.4.
>
> Thanks,
> Jorg

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?

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.

--
--
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:

Post a Comment