Yakov Lerner wrote:
When 'acd' is set, 'vim -S' open files in wrong directory.
To reproduce:
1. make your ~/.vimrc 1-liner 'set acd'
(Alternatively, use use "vim -u NONE -c 'set acd'" instead of vim
in commands below).
2. vim ~/xxx # or
:he options.txt
" now you have two files open: (1) ~/xxx (2)
$VIMRUNTIME/doc/options.txt
:mksession! /tmp/3
:q!
3. vim -S /tmp/3
4. You'll see that buffer 'options.txt' is empty.
':pwd' in window of options.txt shows that current directory is incorrect.
The problem is that ':edit' commands in session-file do not
contain full paths. Incomplete paths do not work when 'acd' is set.
Here are relevant lines from sessionfile, the /tmp/3:
cd /usr/local/share/vim/vim70/doc
edit ~/xxx
edit options.txt
This (3rd line)does not work with 'set acd'. I think all filenames
must be with full path like
edit ~/xxx
edit /usr/local/share/vim/vim70/doc/options.txt
Yakov
Alternately, when the buffer type is "help", :mksession should use
":help options.txt" followed by a cursor-movement command, rather than
":split options.txt" or of ":new" followed at some point by ":edit
options.txt".
Bset regards,
Tony.