Wilon
Wilon

Reputation: 117

Vim netrw source session error?

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

Upvotes: 0

Views: 134

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172718

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.

Upvotes: 1

Related Questions