I've been trying to incorporate tabs in my workflow, but have trouble
saving them in a session. I usually start with an existing session,
make new tabs and source different sessions into each of the tabs.
Then I save a new session-file, hoping it will remember all my tabs.
But it doesn't. When I exit vim and fire up the newly created session,
I find that all the files are there, but all the tabs are gone.
Searched google, but "tabs" seems to be too popular to get a correct
answer.
Thanks,
Percy
Regards,
Chip Campbell
I did not have a "sessionoptions"-setting in my .vimrc. I just changed it to
set ssop="blank, buffers, curdir, folds, help, options, winsize, tabpages"
but get the same result.
vim -u NONE
(:set nocp, set up tabs and whatnot)
:mks! ses.S
:q
If that works (vim -S ses.S), try
vim --noplugin
(same as above)
If the first case worked, then there's likely to be a conflict with
something in your .vimrc or plugins. If the second case works, that'll
narrow it down to your plugins. Further narrowing is an exercise in
disabling plugins and re-enabling them.
Regards,
Chip Campbell
I found out that it wasn't one of my plugins, but rather my vimrc. I
disabled a couple
of things and then it worked. But then I enabled them again and it
worked as well (???).
So I'm afraid I can't really narrow it down. I've moved all my plugins
out of my plugin-
directory and moved them in again, does it re-initalize them maybe? I
don't have a clue.
Nevertheless, here are the things that I believed caused the problem
(either/or):
-----------------------------------------
set viminfo='100,f1
augroup JumpCursorOnEdit
au!
autocmd BufReadPost *
\ if expand("<afile>:p:h") !=? $TEMP |
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ let JumpCursorOnEdit_foo = line("'\"") |
\ let b:doopenfold = 1 |
\ if (foldlevel(JumpCursorOnEdit_foo) >
foldlevel(JumpCursorOnEdit_foo - 1)) |
\ let JumpCursorOnEdit_foo = JumpCursorOnEdit_foo - 1 |
\ let b:doopenfold = 2 |
\ endif |
\ exe JumpCursorOnEdit_foo |
\ endif |
\ endif
" Need to postpone using "zv" until after reading the modelines.
autocmd BufWinEnter *
\ if exists("b:doopenfold") |
\ exe "normal zv" |
\ if(b:doopenfold > 1) |
\ exe "+".1 |
\ endif |
\ unlet b:doopenfold |
\ endif
augroup END
au BufWinLeave ?* mkview
au BufWinEnter ?* silent loadview
-----------------------------------------
Because that's every entry that could remotely affect this behaviour. My
vimrc is not
very big.
--
Rebecca Poole
arta...@fastmail.fm
--
http://www.fastmail.fm - Does exactly what it says on the tin