Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using such sessionopts:

set ssop=blank,buffers,sesdir,folds,localoptions,tabpages,winpos,winsize

The "sesdir" as opposed to "curdir" should store all the paths relative to the directory in which session file is located. Unfortunately there is a line in session file:

args absolute/path/to/file1 absolute/path/to/file2 and/so/on

How do I make vim use only relative paths so I could just put the session file into a git repo and resume my session from any machine?

share|improve this question

1 Answer 1

That sounds strange. When you set sesdir you declare the location of session will be set to be current working directory and all path in the session file will become relative path instead of absolute path.

I've used your sessionopts and it works. I can't find any line related to paths. How are you creating the session file? Standard is:

  1. :mksession [filename]
  2. vim -S [filename]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.