Vim netrw source session error?

114 views Asked by At

I set netrw let g:netrw_liststyle = 3 in my .vimrc.

Then open vim, run :e /tmp and :mksession!.

And I open vim again, run :so Session.vim, can't list right netrw.

enter image description here

1

There are 1 answers

0
Ingo Karkat On BEST ANSWER

The netrw plugin uses a so-called scratch buffer to display the file listing. The contents are not persisted to disk; instead, they are created and updated dynamically by the plugin.

Sessions are meant for "normal" buffers that are backed up by files; most plugins don't play well with them. Some session manager plugins have explicit support for certain plugins, but in general, it is recommended to close any plugin windows before creating a session, and reopening those after session restore.