-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic mechanism for integrating with third party Vim plug-ins #98
Comments
Definitely the desired approach. Can we start with something "simple", like a list of buffer names to ignore? (Regexp patterns) let g:xolox#session#ignore_window_patterns = [ '^\[unite\]', '^vimfiler\:' ] |
@rafi: The vim-session plug-in uses Vim to generate most of the session script including the window layout. I don't think there's any way to prevent split windows from appearing in the session script, otherwise the window layout would be screwed up. So then the windows would have to be closed after the session is loaded. Either way it may screw up the window layout, the question is how much of a problem that is. |
@xolox I've used the trick of yours with commenting out line patterns, it works for Vimfiler, but not for Unite. I'll try the other way around -- closing all Unite windows before saving session, and will test the Vimfiler workaround. Thanks! |
I solved it on the other end. Patched up a unite-(menu)-source to manage the sessions and changed the let current_tab = tabpagenr()
tabdo windo if &ft == 'vimfiler' | bd | endif
execute 'tabnext '.current_tab
let g:xolox#session#wipe_filetypes = [
\ 'unite',
\ { name: 'vimfiler', command: 'VimFilerExplorer' }
\ ] vim-session will iterate through tabs and close matching filetypes. When loading a session any command for a closed window will be executed in the original tab. What say you? |
Close the windows of vimfiler before session saving is fine for me, is there any way I can add the script instead of hacking the vim-session's code? |
+1 |
The current situation is as follows:
This is how I would like things to be:
The idea here is that the core of the plug-in won't have to focus on adding/keeping compatibility with random third party plug-ins, instead there's just the extension mechanism which should work properly.
Default integration with a bunch of third party plug-ins could still be included with the vim-session plug-in, but it could be kept in separate Vim script files. This would make it easier for users to contribute bits of integration.
This probably isn't going to be easy, it might even turn out that it's not possible to set something up which is simple & extensible yet reliable. But if I never try I'll never find out :-). Also I really don't want to be adding integration with third party Vim plug-ins until the end of time ;-).
The text was updated successfully, but these errors were encountered: