Consider the following snippet:
vim9script # Set stuff in the newly created window var my_win_nr = winnr('$') var my_win_id = win_getid(my_win_nr) win_execute(my_win_id, 'wincmd L') win_execute(my_win_id, 'vertical resize 50') win_execute(my_win_id, 'file MyStuff') win_execute(my_win_id, \ 'setlocal buftype=nofile bufhidden=hide \ nobuflisted noswapfile nowrap \ nonumber equalalways winfixwidth') exe ":close"
By that I have a) a
winid for a window that I set with some properties set and b) a buffer called
MyStuff with some properties set.
How to re-open the same window on the same buffer with all the properties that I set so far in Vim9script by using functions or methods?
EDIT: From the docs you won't understand it. It is claimed that the ID is unique for a window, but when you create a new window you get a new ID. This suggest that the old ID data still live somewhere even if the window is not displayed on screen (and therefore one may think that such data may be eventually retrieved).