-
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
auto save/load not working #19
Comments
please try to put exactly this to your ~/.vimrc: let g:session_autoload="yes" |
I have this same issue after placing the following in my
|
Sorry for the long silence. I realized just now that the problem might be very simple:
To confirm my suspicion: Open Vim and execute
|
See also issue #25 which prefers the code change (I think I agree). |
This should be fixed in version 1.7.2 released just now. Thanks for the bug report! I'm closing this issue now, but if any of you have problems with the new version feel free to reopen this issue. |
Hello, I did indeed manually create my first session as you described, however, it doesn't seem to be working. When I restart vim I see a blank window. I have to manually type I've tried it with 1.7.2 as well and still have the same problem. |
Okay it sounds like there's something else going on here. I looked at the settings you posted previously and I don't see why this shouldn't be working as documented (it is for me :-). There could potentially be a lot of reasons, so below are some random stabs in the dark. Please execute the Vim commands below and report their output (in GVim you should be able to copy/paste from the dialog): :call confirm(string(xolox#session#get_names()))
:call confirm(printf("bufnr: %i", bufnr('$')))
:call confirm(printf("bufname: %s", bufname('%')))
:call confirm(printf("modified: %i", &mod))
:call confirm(printf("lines: %i", len(getline(1, '$')))) |
I just thought of one more thing: Can you take a look at your |
The commands had the following results (in a popup dialog)
The last 4 are specific to the file I'm currently working on correct? There contents of
The contents of
|
Thanks for the quick reply! Did you execute the Vim commands right after starting Vim, when you would have expected your session to auto-load? I'm sorry I forgot to mention that! It is very important: the |
Ah I see! Well something interesting just happened. I restarted vim and was greeted with the usual blank window. Typing your 2nd command however gave me a non-zero number, so I went ahead and issued a close all buffers command: When I open vim and it doesn't load the session correctly, executing your commands give me:
The 3rd one did indeed have nothing after the bufname Typing
Where |
Wow, I'm lost. Either another Vim plug-in is doing this or this is a Vim feature I'm not aware of... Can you execute |
It reads:
|
If it's not an esoteric Vim feature or another plug-in, there's only other thing I can think of: Does your original session have one or multiple tab pages? If only one, please try opening several tab pages, save the session, restart Vim and see if you get anything useful back. This may sound like magic, but there's an explanation of course (if you're interested): The plug-in does some funky magic with opening and closing buffers here and there, which has a tendency to sometimes also close the associated tab page and/or split window, causing sessions to become corrupt. There have been bugs like that before, they got squashed, but there might be more left (the compatibility with plug-ins like NERDTree makes |
Okay maybe it's not a very esoteric Vim feature at all, just a feature I didn't know about: When |
Hey I tried opening a new tab and things got crazy/didn't work. I have the following line my
In all honesty, I added it to my |
I just published version 1.7.3 in which auto-load should work correctly regardless of the viminfo option. Can you confirm that it works correctly now? Thanks for the remote debugging session :-) you helped me squash a bug! |
Everything seems to be ok! I close all buffers, quit vim, deleted all of my sessions, updated and started fresh. Things seem to be working although there is two slightly strange things:
Anyway, if these make immediate sense/quick fixes then go for it! Otherwise, these are really no big deal. Thanks for your effort! |
i installed this plugin without any modification
commands all run well
but just no autosave/load even i enabled the opts.
echo checked in vim, they are set to 1
but still no luck...
anything i miss?
what i put in my vimrc is:
let g:session_autosave = 1
let g:session_autoload = 1
also tried;
let g:session_command_aliases = 1
let g:session_directory = "~/.vim_runtime/sessions"
let g:session_autoload = 'yes'
let g:session_autosave = 'yes'
no luck..
thanks
The text was updated successfully, but these errors were encountered: