Wednesday, April 24, 2019

Re: sessionoptions not restore filetype detection ??

On Wed, Apr 24, 2019 at 10:43 PM <nivaemail@gmail.com> wrote:
>
> Le mercredi 24 avril 2019 21:18:18 UTC+2, Tony Mechelynck a écrit :
> > On Tue, Apr 23, 2019 at 6:02 PM <nivaemail@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > Using mksession file and these sessionoptions, I don't see why vim does not restore filetype detection after reloading .vim files for example.
> > >
> > > Thank you
> > > NiVa
> > >
> > > " set sessionoptions=help,resize,winpos,winsize
> >
> > After having a look at that 'sessionoptions' setting and its many
> > variations (none of those you set BTW, relate to filetype detection),
> > there's nothing about filetype detection that strikes my eyes.
> > However, ISTR that "vim -S" sources your vimrc before the session
> > file, so any "filetype" statement in your vimrc (or, nowadays, the
> > "filetype plugin indent on" statement in defaults.vim if you don't
> > have a vimrc) will be executed as well. Are you the kind of person who
> > changes filetype detection settings (to something else than what your
> > vimrc had set) long after Vim has started, and expects them to stay
> > that way even after a reload? Then you have a most unusual use case.
> >
> > Best regards,
> > Tony.
>
> Hi Tony,
>
> What I simply notice is that when I comment on this line in my _vimrc:
> "set sessionoptions = help, resize, winpos, winsize
>
> Then, the detection of file types works properly.
>
> When I uncomment this line, the detection of file types no longer works.

That hadn't been clear to me on reading your previous post.
>
>
> PS: Sorry but I did not understand everything about where you wanted to take me about the kind of person I am.

Then forget it; it was due to misunderstanding what was your problem.
>
> PS2: I know this mksession line does not contain anything related to file type detection

Now maybe this is relevant, since your 'sessionoptions' setting is
much more restrictive than the default. If you want to find out where
the problem (which could be a documentation problem) exactly sits, try
adding the follwing session (sub-)options one by one to what you
already have:
options
tabpages
buffers
blank
folds
curdir
terminal
and if by that time there is still no change, removing "winpos". If
and when you get two settinigs differing only by one sub-option, and
one of them restores filetype detection and the other doesn't, then
you'll know which sub-option is responsible. This will allow you to
propose to Bram an additional line or two somewhere between lines 6682
and 6712 of runtime/doc/options.txt in the Vim source master.


Best regards,
Tony.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment