To ask in a more precise way: is there a function that works like winnr()
, but returns a non-changed value for each window?
I'm trying to use hotkeys to switch between buffers in my vim. It all worked fine. But when I put my cursor in another window like NERDTree's and press the hotkey, NERDTree just disappear and its window switched to another buffer. To fix this, I think I should enable the hotkeys if only if the cursor is in the first window opened with vim. Is there a function like is_first_window()
in vim script?
Thank you.