I have autocmd BufEnter * silent! lcd %:p:h
in my .vimrc so that the current buffer's pwd is always set correctly. Unfortunately mksession
does not save sessions properly because of this.
Is there either a better way to save sessions, or a way to make these two features play together well? Disabling the autocmd temporarily with :noautocmd mksession session1
doesn't seem to work.