dhruvasagar / vim-prosession

Handle vim sessions like a pro
254 stars 22 forks source link

g:loaded_prosession disables plugin if set to any value #95

Closed dragon-architect closed 2 years ago

dragon-architect commented 2 years ago

Does what it says on the (issue's) tin! If let g:loaded_prosession exists at all--doesn't matter what its value is explicitly set to--it disables the plugin entirely.

Replication steps: let g:loaded_prosession = 0 in vimrc. Plugin disabled, as documented. let g:loaded_prosession = 1 (default value as documented) in vimrc. Plugin still disabled. "let g:loaded_prosession = 1 (commented out) in vimrc. Plugin works because variable does not even exist.

dragon-architect commented 2 years ago

Relatedly, g:prosession_on_startup also doesn't seem to work properly, either. Might be a separate issue but might also be related to this one if the same kind of variable check is being used on both.

dhruvasagar commented 2 years ago

This is by design, it's meant to avoid vim to load the plugin file multiple times but if set by the user it can be used to disable the plugin.

dhruvasagar commented 2 years ago

NOTE: It's not meant for the user.

dhruvasagar commented 2 years ago

@dragon-architect

dragon-architect commented 2 years ago

Oh, so this variable is set internally by prosession when it's first loaded so that it doesn't get loaded repeatedly?

dhruvasagar commented 2 years ago

@dragon-architect yes, and this is typically done by all plugins as a convention.

dhruvasagar commented 2 years ago

@dragon-architect Kindly open a separate issue for g:prosession_on_startup and I can take a look

dragon-architect commented 2 years ago

@dhruvasagar Done! Sorry for the delay. I'm terrible at getting around to things, ehe.