diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-10 21:22:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-10 21:22:58 +0200 |
commit | d20dcb3d011da6111153109f6e46fbd5c7fe9fb6 (patch) | |
tree | 177b708d63b5bdace192c344b5a431298a575df2 /runtime | |
parent | 410e98a70bc00ea4bed51e55a8fe20e56a72c087 (diff) |
patch 8.1.2020: it is not easy to change the window layoutv8.1.2020
Problem: It is not easy to change the window layout.
Solution: Add win_splitmove(). (Andy Massimino, closes #4561)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 2ee1c247cd..f19e0c04a7 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2875,6 +2875,8 @@ win_gotoid({expr}) Number go to window with ID {expr} win_id2tabwin({expr}) List get tab and window nr from window ID win_id2win({expr}) Number get window nr from window ID win_screenpos({nr}) List get screen position of window {nr} +win_splitmove({nr}, {target} [, {options}]) + none move window {nr} to split of {target} winbufnr({nr}) Number buffer number of window {nr} wincol() Number window column of the cursor winheight({nr}) Number height of window {nr} @@ -10144,6 +10146,28 @@ win_screenpos({nr}) *win_screenpos()* Can also be used as a |method|: > GetWinid()->win_screenpos() < +win_splitmove({nr}, {target} [, {options}]) *win_splitmove()* + Move the window {nr} to a new split of the window {target}. + This is similar to moving to {target}, creating a new window + using |:split| but having the same contents as window {nr}, and + then closing {nr}. + + Both {nr} and {target} can be window numbers or |window-ID|s. + + Returns zero for success, non-zero for failure. + + {options} is a Dictionary with the following optional entries: + "vertical" When TRUE, the split is created vertically, + like with |:vsplit|. + "rightbelow" When TRUE, the split is made below or to the + right (if vertical). When FALSE, it is done + above or to the left (if vertical). When not + present, the values of 'splitbelow' and + 'splitright' are used. + + Can also be used as a |method|: > + GetWinid()->win_splitmove(target) +< *winbufnr()* winbufnr({nr}) The result is a Number, which is the number of the buffer associated with window {nr}. {nr} can be the window number or |