Sunday, April 9, 2017

Re: :tabdo -- get back to original tab

On Mon, Apr 10, 2017 at 3:06 AM, 'Suresh Govindachar' via vim_use
<vim_use@googlegroups.com> wrote:
> Hello,
>
> Any suggestions for getting back to the starting tab after issuing the
> following command?:
>
> :tabdo windo set nocursorbind
>
> Thanks,
>
> --Suresh

:let save_tab = tabpagenr()
:let save_win = winnr()
:tabdo windo set nocursorbind
:exe "tabnext" save_tab
:exe save_win "wincmd w"

See
:help tabpagenr()
:help winnr()
:help :tabnext
:help :wincmd
:help CTRL-W_w

Of course, this would not have worked if your tabdo command could have
opened or closed tabs and/or windows.

Best regards,
Tony.

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