On 2022-06-06, Manas wrote: > Hi folks, I am writing a vim plugin and I want it to load in only one > tab. Other tabs should be oblivious to the plugin. Is there a way to > achieve that? Also, is it possible to load it in only one pane?
Vim doesn't load plugins into tabs, windows or buffers, it simply loads plugins. Plugins can determine the tab, window or buffer that is current when they are loaded, however, and can use that information to control their behavior. Vim uses the term "window" rather than "pane". Vim has mechanisms that make it easy to limit the scope of a command to a buffer, but not to a window or a tab page. For the most part, a tab page is simply a set of windows. See :help windows-intro :help tab-page-intro The behavior of a command can be changed according to the current window or tab page by testing the current window or tab page or by using a window-local or tab-local variable. The gettabinfo() returns a list of all the windows in the current tab, which could be useful. See :help t:var :help gettabvar() :help gettabinfo() You can probably achieve the behavior you want, just not the way you thought you could. If you need more information, it would help to know what you are trying to achieve and what things you want to happen or not happen in particular tabs or windows. Regards, Gary -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20220606150546.GA20513%40phoenix.