mhinz / vim-startify

:link: The fancy start screen for Vim.
MIT License
5.31k stars 187 forks source link

Save sessions with readonly mode for some buffer #377

Closed caneta closed 5 years ago

caneta commented 5 years ago

Hello! I often set readonly mode for some buffer in my sessions, but when I save the session, close vim and re-open the session the readonly mode is lost. Is there a way to preserve readonly state for some buffer when saving a session? Thank you!

Glaciohound commented 5 years ago

I have a similar problem

When trying to save a session with NERDTree window, and opening it later, I found that the NERDTree window is replaced with a write-able window with name NERDtree[x]

Could this plugin be adde with support to NERDTree plugin? That would make this project even more perfect.

Thanks!

mhinz commented 5 years ago

Startify is mainly meant for opening "recent things". The session features are only thin wrappers around Vim's session capabilities (:h :mksession).

But you can tell Vim what to write in a session file: :h 'sessionoptions'

@caneta Put set sessionoptions+=localoptions in your vimrc. (Will only work for new sessions.)

@hericopter As I said above, this is not strictly a Startify issue. Search for "vim restore session nerdtree" and friends.