Mercurial > vim
comparison runtime/doc/eval.txt @ 18049:a9f1656f13c9 v8.1.2020
patch 8.1.2020: it is not easy to change the window layout
Commit: https://github.com/vim/vim/commit/d20dcb3d011da6111153109f6e46fbd5c7fe9fb6
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 10 21:22:58 2019 +0200
patch 8.1.2020: it is not easy to change the window layout
Problem: It is not easy to change the window layout.
Solution: Add win_splitmove(). (Andy Massimino, closes https://github.com/vim/vim/issues/4561)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 10 Sep 2019 21:30:05 +0200 |
parents | 11dca9732a48 |
children | 8ac85adee561 |
comparison
equal
deleted
inserted
replaced
18048:ceafe0986ad7 | 18049:a9f1656f13c9 |
---|---|
2873 win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab} | 2873 win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab} |
2874 win_gotoid({expr}) Number go to window with ID {expr} | 2874 win_gotoid({expr}) Number go to window with ID {expr} |
2875 win_id2tabwin({expr}) List get tab and window nr from window ID | 2875 win_id2tabwin({expr}) List get tab and window nr from window ID |
2876 win_id2win({expr}) Number get window nr from window ID | 2876 win_id2win({expr}) Number get window nr from window ID |
2877 win_screenpos({nr}) List get screen position of window {nr} | 2877 win_screenpos({nr}) List get screen position of window {nr} |
2878 win_splitmove({nr}, {target} [, {options}]) | |
2879 none move window {nr} to split of {target} | |
2878 winbufnr({nr}) Number buffer number of window {nr} | 2880 winbufnr({nr}) Number buffer number of window {nr} |
2879 wincol() Number window column of the cursor | 2881 wincol() Number window column of the cursor |
2880 winheight({nr}) Number height of window {nr} | 2882 winheight({nr}) Number height of window {nr} |
2881 winlayout([{tabnr}]) List layout of windows in tab {tabnr} | 2883 winlayout([{tabnr}]) List layout of windows in tab {tabnr} |
2882 winline() Number window line of the cursor | 2884 winline() Number window line of the cursor |
10141 Return [0, 0] if the window cannot be found in the current | 10143 Return [0, 0] if the window cannot be found in the current |
10142 tabpage. | 10144 tabpage. |
10143 | 10145 |
10144 Can also be used as a |method|: > | 10146 Can also be used as a |method|: > |
10145 GetWinid()->win_screenpos() | 10147 GetWinid()->win_screenpos() |
10148 < | |
10149 win_splitmove({nr}, {target} [, {options}]) *win_splitmove()* | |
10150 Move the window {nr} to a new split of the window {target}. | |
10151 This is similar to moving to {target}, creating a new window | |
10152 using |:split| but having the same contents as window {nr}, and | |
10153 then closing {nr}. | |
10154 | |
10155 Both {nr} and {target} can be window numbers or |window-ID|s. | |
10156 | |
10157 Returns zero for success, non-zero for failure. | |
10158 | |
10159 {options} is a Dictionary with the following optional entries: | |
10160 "vertical" When TRUE, the split is created vertically, | |
10161 like with |:vsplit|. | |
10162 "rightbelow" When TRUE, the split is made below or to the | |
10163 right (if vertical). When FALSE, it is done | |
10164 above or to the left (if vertical). When not | |
10165 present, the values of 'splitbelow' and | |
10166 'splitright' are used. | |
10167 | |
10168 Can also be used as a |method|: > | |
10169 GetWinid()->win_splitmove(target) | |
10146 < | 10170 < |
10147 *winbufnr()* | 10171 *winbufnr()* |
10148 winbufnr({nr}) The result is a Number, which is the number of the buffer | 10172 winbufnr({nr}) The result is a Number, which is the number of the buffer |
10149 associated with window {nr}. {nr} can be the window number or | 10173 associated with window {nr}. {nr} can be the window number or |
10150 the |window-ID|. | 10174 the |window-ID|. |