0

The tabnames plugin keeps a tab local variable t:tab_name for the tab label. Unfortunately, mksession does not appear to save tab specific variables. What options do I have for saving this data, as I will need it to later (manually) load the tab names. Here's what I have so far:

  1. Update sessionoptions to save tab data (is this possible?)
  2. Find some SessionSavePre event to traverse all tabs and make a global list of tab names g:tab_names (does such an event exist?)
  3. Update a global tab names list g:tab_names every time tabs are added or removed (I would rather not do this as it involves shifting previous entries around)
puk
  • 16,318
  • 29
  • 119
  • 199

1 Answers1

0

I found a way around this here. What I did was set up a helper Python script which went through the file and looked for tabedit commands. Once found, it would append all necessary tab data after that command. The caveat is that you can't write/load complex objects like lists, and that the first tab is actually loaded as a window (via edit) and not as a tab.

I then made a mapping like so to make sure I always used my helper script when saving sessions.

nnoremap <leader>mks :call MakeFullSession()<CR>
Community
  • 1
  • 1
puk
  • 16,318
  • 29
  • 119
  • 199