I'm trying to set a nmap bind to make the focus change from Window B back to Window A. Both Window IDs are store at the script level:
The current snippet I've is the following at plugins/my-plugin.vim:
function! s:InitialSetup let s:win_id_a = win_getid() bot new let s:win_id_b = win_getid() " bunch of unrelated setups ... win_gotoid(s:win_id_b) " Making sure we are binding the correct win/buff map <buffer> c :call win_gotoid(s:win_id_a)<CR> endfunction
When I tried to trigger the map/bind I got an error:
Undefined variable: s:win_id_a.
The question is: Should I "cast"
s:win_id_ato a global OR is there another way I can achieve this
win_gotoid bind call passing the script level variable?