Vim’s wrap option is local to the window, not buffer and if I would like to have a buffer specific map I can do that via map-<buffer>.
So putting the two together, if I want a wrap-mode specific mapping, how can I achieve map-<window> functionality?
Thanks!
As a window can display different buffers at various times, it doesn’t make sense to have window-local mappings.
I think what you’re really asking for is how to do different things in a mapping depending on a window-local setting like
'wrap'. You can access the local'wrap'setting via the&l:wrapspecial variable, like in this example: