Closed fjchen7 closed 1 year ago
Yeah, you're setting buffer-local mappings. Those are scoped to a buffer, which can be shared between windows.
I have opened feature requests with both neovim/neovim and vim/vim about having window-local
mappings.
https://github.com/vim/vim/issues/9339 https://github.com/neovim/neovim/issues/16263
Closing this as its a known "issue" and is already being tracked in the proper channels.
Describe the bug I set some options and keymap in
post_open_hook
. However it still take effect when I split the file.To Reproduce
After I press
v
ors
to split float window, the changed options and keymap also takes effect on the new window. I can't modify file and can't usev/s/t
in this case. That is very counterintuitive.Expected behavior
Settings on
post_open_hook
only have effect on float window.Additional context
Float window and the new split window share the same buffer. I think this is the root cause.