{"action":"created","issue":{"url":"https://api.github.com/repos/tpope/vim-obsession/issues/45","repository_url":"https://api.github.com/repos/tpope/vim-obsession","labels_url":"https://api.github.com/repos/tpope/vim-obsession/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/tpope/vim-obsession/issues/45/comments","events_url":"https://api.github.com/repos/tpope/vim-obsession/issues/45/events","html_url":"https://github.com/tpope/vim-obsession/issues/45","id":353073734,"node_id":"MDU6SXNzdWUzNTMwNzM3MzQ=","number":45,"title":"Store the \"alternative buffer\" in the session","user":{"login":"Dbz","id":628429,"node_id":"MDQ6VXNlcjYyODQyOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/628429?v=4","gravatar_id":"","url":"https://api.github.com/users/Dbz","html_url":"https://github.com/Dbz","followers_url":"https://api.github.com/users/Dbz/followers","following_url":"https://api.github.com/users/Dbz/following{/other_user}","gists_url":"https://api.github.com/users/Dbz/gists{/gist_id}","starred_url":"https://api.github.com/users/Dbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dbz/subscriptions","organizations_url":"https://api.github.com/users/Dbz/orgs","repos_url":"https://api.github.com/users/Dbz/repos","events_url":"https://api.github.com/users/Dbz/events{/privacy}","received_events_url":"https://api.github.com/users/Dbz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-08-22T18:36:18Z","updated_at":"2018-08-27T02:08:45Z","closed_at":null,"author_association":"NONE","body":"Hello tpope,\r\n\r\nI'd like to store the alternative buffer in the session so that I can close vim, open it back up and type `<c-^>` and automatically switch to the previous buffer that I was using.\r\n\r\nI am also using [vim-prosession](https://github.com/dhruvasagar/vim-prosession) and made [a similar issue](https://github.com/dhruvasagar/vim-prosession/issues/50) and dhruvasagar was super kind to help me get working vimrc code that will achieve my goal, but I would love to share this functionality in vim-obsession.\r\n\r\nTo me, this seems like a relatively harmless addition that just adds a slight UX benefit to using vim-obsession, but you will undoubtably know best.\r\n\r\nHere is the code as it currently stands:\r\n\r\n```\r\n\" https://github.com/dhruvasagar/vim-prosession/issues/50\r\n\r\nfunction! s:preserve_alt_buffer()\r\n  let l:alternate = fnameescape(expand('#'))\r\n  if !empty(l:alternate)\r\n    call system('echo \"let @#=\\\"'.l:alternate.'\\\"\" >> '.v:this_session)\r\n  endif\r\nendfunction\r\n\r\naugroup ProsessionPreserveAlt\r\n  au!\r\n\r\n  autocmd VimLeave * call s:preserve_alt_buffer()\r\naugroup END\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/tpope/vim-obsession/issues/comments/416094579","html_url":"https://github.com/tpope/vim-obsession/issues/45#issuecomment-416094579","issue_url":"https://api.github.com/repos/tpope/vim-obsession/issues/45","id":416094579,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjA5NDU3OQ==","user":{"login":"dhruvasagar","id":88258,"node_id":"MDQ6VXNlcjg4MjU4","avatar_url":"https://avatars0.githubusercontent.com/u/88258?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvasagar","html_url":"https://github.com/dhruvasagar","followers_url":"https://api.github.com/users/dhruvasagar/followers","following_url":"https://api.github.com/users/dhruvasagar/following{/other_user}","gists_url":"https://api.github.com/users/dhruvasagar/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvasagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvasagar/subscriptions","organizations_url":"https://api.github.com/users/dhruvasagar/orgs","repos_url":"https://api.github.com/users/dhruvasagar/repos","events_url":"https://api.github.com/users/dhruvasagar/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvasagar/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T02:08:45Z","updated_at":"2018-08-27T02:08:45Z","author_association":"NONE","body":"@tpope sorry it looks like a combination of `getwininfo()` and others such as `getbufinfo / getbufvar` does not yield the results i was hoping for. Unfortunately the `@#` register behavior is rather elusive."}}
{"actor":{"display_login":"dhruvasagar"}}