A trailing comma shouldn't be required. Can a Vim dev have a look, please? --
Salman On Tue, Feb 19, 2019, 03:49 <[email protected] wrote: > Le lundi 18 février 2019 17:50:01 UTC+1, [email protected] a écrit : > > Le dimanche 17 février 2019 21:38:38 UTC+1, Salman Halim a écrit : > > > > Okay I've done some further tests. > > > > > > > > > > > > > > :bufdo! bd! >> clear all buffers as you said. > > > > > > > > > > > > > > Yesterday I had copied my session.vim file into ~/desktop so it > seems it take care about history actions. > > > > > > > > > > > > > > When I close Vim, no buffer is listed in buffers'list. > > > > > > > When I open Vim again, buffers'list contains my yesterday > ~/desktop/sessions.vim which is not exsiting anymore. > > > > > > > > > > > > > > ... see the gif. > > > > > > > > > > > > https://drive.google.com/open?id=1xPX4InUKhYEVrBuosfHqNk_SNRXY7PgT > > > > > > > > > > > > 1. Out of curiosity, what are the values of g:geometry#sessionfile and > g:geometry#file? > > Ok rewrite the autoload vimscript as below : now jsut one session. > > > > > 2. Have you tried writing a separate session file out by hand right > after doing the bufdo! bd! to see if it that session file contains anything > different than the automatically generated one? > > > > > > > > > 3. Have you tried using bufwipe instead of bufdelete? bufdo! bw! > (That's "stronger" than deleting a buffer.) > > > > Tried :bufdo! bw! out of :bufdo! bd! then :buffers returns only noname > buffer > > > > Then I confirm the the attached mainsession.vim is written at vim leave. > > > > And on reload, buffers command list noname and mainsession.Vim > > > > > 4. The list of buffers is controlled through viminfo, not just > sessions. What's the timestamp of your viminfo? Is it getting updated every > time you quit? What are its contents? Could the buffer be coming back > through that file? > > > > > :rviminfo says nothing. > > > > > > > > > > Here's the thing: I don't have the autocommands that you do. I also > cannot reproduce what you're seeing. I remove all my buffers, write out the > session file with an empty Vim (by hand), quit and come back. The first > thing I do is execute ':buffers' to confirm it's still empty and then load > the session file. My second call to :buffers is STILL empty. I also have no > buffers or args in my session file. > > > > > > -- > > > > > > > > > Salman > > > > > > I, too, shall something make and glory in the making. > > > > > > > > autoload/geometry.vim > > let g:geometry#sessionfile=expand('$vimruntime/sessions/mainSession.vim') > > > > fun! geometry#SaveGeometry() "{{{ > > > > echo 'Save' > > if !filereadable(g:geometry#sessionfile) > > call mkdir(expand('$vimruntime/sessions'),0700) > > endif > > silent! execute 'mks! '.g:geometry#sessionfile > > endfunction "}}} > > > > fun! geometry#RestoreGeometry() "{{{ > > > > echo 'Restore' > > if filereadable(g:geometry#sessionfile) > > silent! execute 'source '.g:geometry#sessionfile > > endif > > endfunction "}}} > > Solved, after some tests, it appears that sessionoptions in _vimrc need to > be written like this : > set sessionoptions=buffers,help,resize,winpos,winsize, > instead of > set sessionoptions=buffers,help,resize,winpos,winsize > > Otherwise, there is no restoration of winsize. > > -- > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
