문제

Sometimes when I use vim, I need to change some local settings for certain buffers via setlocal. Later, when I save and restore a session with mksession and source, these settings are not saved and I need to setlocal them all again.

This is very inconvenient. So is there a way to keep local settings with a session?

도움이 되었습니까?

해결책

Looks like you'll need to change the 'sessionoptions' value. From :h 'sessionoptions':

Changes the effect of the :mksession command. It is a comma separated list of words. Each word enables saving and restoring something:

localoptions options and mappings local to a window or buffer (not global values for local options)

Ergo:

:set sessionoptions+=localoptions

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top