tpope/vim-obsession

How about just one working example of new statusline or titlestring?

RichardDooling opened this issue · 1 comments

I like the idea, but don't see how it works.

Let's say I wanted to use an asterisk as my indicator? And add it to the titlestring.

What would I add to .vimrc?

:set titlestring=%t%(\ %M%)%(\ (%F)%)%a\ -\ VIM

And how to add the obsession indicator?

%{ObsessionIndicator('[%s]')}

Not sure I understand your confusion; literally all you have to do is add that %{...} expression to 'titlestring'.

Custom indicators aren't officially supported but I just now pushed a commit that makes it possible to do something like

set titlestring=...%{['','-','*'][ObsessionStatus()]}...