However, a window-local option would allow for much better and more fine-grained customization. Since windows are viewpoints onto buffers, there are use cases where you might want to have indentation guides disabled for one window but not disabled for another one showing the same buffer. Similar built-in Vim options like list or number are also all window-local options instead of buffer-local options.
For example, the plugin diffview.nvim creates a new tab for diff views. I can jump back and forth to the diffview window by switching tabs. I generally want my diffviews to not show indentation guides, but I want all other windows to show them. Currently, it is possible to turn off indentation guides in diff windows by registering an autocmd on events like OptionSet diff, BufWinEnter, or similar. However, when turning off indentation guides for buffers involved in a diff, it turns off indentation guides for all windows with that buffer, even windows that are not in diff mode.
Expected behavior
Having a window local setting to enable or disable indentation guides
Problem
Hello,
It would be great if IBL could support a window-local option to enable or disable indentation guides. I'm aware that there is a buffer-local option:
However, a window-local option would allow for much better and more fine-grained customization. Since windows are viewpoints onto buffers, there are use cases where you might want to have indentation guides disabled for one window but not disabled for another one showing the same buffer. Similar built-in Vim options like
list
ornumber
are also all window-local options instead of buffer-local options.For example, the plugin
diffview.nvim
creates a new tab for diff views. I can jump back and forth to the diffview window by switching tabs. I generally want my diffviews to not show indentation guides, but I want all other windows to show them. Currently, it is possible to turn off indentation guides in diff windows by registering an autocmd on events likeOptionSet diff
,BufWinEnter
, or similar. However, when turning off indentation guides for buffers involved in a diff, it turns off indentation guides for all windows with that buffer, even windows that are not in diff mode.Expected behavior
Having a window local setting to enable or disable indentation guides