tpope / tpope/vim-obsession

tagbar

Open
#57 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
1.9k
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Dear developer,
if 'set sessionsoptions-=blank' is used, tagbar (https://github.com/majutsushi/tagbar) is
not restored on reloading the session...
Below I attached a diff -u with the needed change to fix this issue,

best C.

--- obsession_orig.vim	2019-07-28 09:38:50.000000000 +0200
+++ obsession.vim	2019-07-28 09:39:00.000000000 +0200
@@ -73,7 +73,9 @@
   let sessionoptions = &sessionoptions
   if exists('g:this_obsession')
     try
-      set sessionoptions-=blank sessionoptions-=options sessionoptions+=tabpages
+      "tagbar is considered a blank windows by vim and thus it is not reopened if -=blank is used
+      set sessionoptions-=options sessionoptions+=tabpages
+      "set sessionoptions-=blank sessionoptions-=options sessionoptions+=tabpages
       execute 'mksession! '.fnameescape(g:this_obsession)
       let body = readfile(g:this_obsession)
       call insert(body, 'let g:this_session = v:this_session', -3)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in obsession.vim around the sessionoptions handling and the mksession call shown in the issue. Reproduce a session containing tagbar with sessionoptions-=blank, then reload it and verify that tagbar is restored without breaking the existing session behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.