diff options
author | butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com> | 2020-01-02 06:06:11 -0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2020-01-02 06:06:11 -0800 |
commit | cbc8d72fde4b19176028490934ff7a447afe523c (patch) | |
tree | 80c962c8c65b356e55b9a55e0f67c1ba2b24b78d /runtime | |
parent | 2c62b2fc56b6b86a930356ccf48ba8fb189a7654 (diff) | |
download | rneovim-cbc8d72fde4b19176028490934ff7a447afe523c.tar.gz rneovim-cbc8d72fde4b19176028490934ff7a447afe523c.tar.bz2 rneovim-cbc8d72fde4b19176028490934ff7a447afe523c.zip |
tabpage: track last-used tabpage #11626
In a multi-window scenario, it is possible to return focus to the last
accessed window via n_CTRL-W_p. However, in the case of a multi-tab
scenario, there was previously no way to return focus to the last
accessed *tab*. Here, that ability is added via n_g<tab>.
Additionally, the index of the previous tab is exposed via
tabpagenr('#'), mirroring the existing functionality of winnr('#').
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 8 | ||||
-rw-r--r-- | runtime/doc/index.txt | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 960a42ecbf..67277d19dd 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -8591,8 +8591,12 @@ tabpagebuflist([{arg}]) *tabpagebuflist()* tabpagenr([{arg}]) *tabpagenr()* The result is a Number, which is the number of the current tab page. The first tab page has number 1. - When the optional argument is "$", the number of the last tab - page is returned (the tab page count). + The optional argument {arg} supports the following values: + $ the number of the last tab page (the tab page + count). + # the number of the last accessed tab page (where + |g<Tab>| goes to). If there is no previous + tab page, 0 is returned. The number can be used with the |:tab| command. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index ed9853a8da..3b057575a8 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -222,6 +222,8 @@ tag char note action in Normal mode ~ |CTRL-]| CTRL-] :ta to ident under cursor |CTRL-^| CTRL-^ edit Nth alternate file (equivalent to ":e #N") +|CTRL-<Tab>| CTRL-<Tab> same as `g<Tab>` : go to last accessed tab + page CTRL-_ not used |<Space>| <Space> 1 same as "l" @@ -570,6 +572,8 @@ tag command action in Normal mode ~ following the file name. |CTRL-W_gt| CTRL-W g t same as `gt`: go to next tab page |CTRL-W_gT| CTRL-W g T same as `gT`: go to previous tab page +|CTRL-W_g<Tab>| CTRL-W g <Tab> same as `g<Tab>` : go to last accessed tab + page |CTRL-W_h| CTRL-W h go to Nth left window (stop at first window) |CTRL-W_i| CTRL-W i split window and jump to declaration of identifier under the cursor @@ -788,6 +792,7 @@ tag char note action in Normal mode ~ |g<LeftMouse>| g<LeftMouse> same as <C-LeftMouse> g<MiddleMouse> same as <C-MiddleMouse> |g<RightMouse>| g<RightMouse> same as <C-RightMouse> +|g<Tab>| g<Tab> go to last accessed tab page |g<Up>| g<Up> 1 same as "gk" ============================================================================== |