nnoremap go :Obsession<CR>:redraw!<CR>
nnoremap gO :Obsession!<CR>:redraw!<CR>
I'm not too crazy about these maps. I would much rather just hook into Obsession so I can continue to use :O<CR> and :O!<CR>.
I'm also not sure that the redraw!s are the correct solution to getting the status to update. It feels messy but was all I could come up with.
Would you be open to including this in the plugin itself? Obviously the Status function would need to change what it returns. I'm also not 100% sure the logic is sound... I don't handle the exceptional case where g:this_obsession and b:this_session is not set. In any event, I'm looking for a fugitive#status() analogue here.
If you are trying to force a status line redraw, you can do :let &readonly = &readonly. I'd accept a pull request to add that to the :Obsession implementation.
I find it quite convenient to have Obsession's status showing.
To add the status to my statusline, I use the following function:
And then use the following two maps:
I'm not too crazy about these maps. I would much rather just hook into Obsession so I can continue to use
:O<CR>
and:O!<CR>
.I'm also not sure that the
redraw!
s are the correct solution to getting the status to update. It feels messy but was all I could come up with.Would you be open to including this in the plugin itself? Obviously the Status function would need to change what it returns. I'm also not 100% sure the logic is sound... I don't handle the exceptional case where g:this_obsession and b:this_session is not set. In any event, I'm looking for a fugitive#status() analogue here.
Thanks!