Status bar not displaying correctily
RodrigoA-Fernandez opened this issue · 1 comments
Please Review Before Posting!
- I checked that the bug does not happen in the CodeMirror Vim demo. If it does, please report it there and not here.
- I'm reasonably sure that this bug is indeed about the Vimrc file support and not a general Vim in Obsidian issue. If it's a general Vim issue, report it here.
Describe the bug:
Status bar is not like the ReadMe example even when I've used the same css.
To Reproduce:
- Install the plugin
- add css
- turn on status bar options in settings
- restart obsidian.
Environment (please complete the following information):
- OS: Windows
- Vimrc plugin version: 0.9.0
Additional context:
I was testing the css snippet myself and here is what I understood.
the css is looking for an attribute [data-vim-mode="normal"]
in order to change the color, background etc.
while debugging inside the app and looking at the plugin main.js
I found a couple of issues:
- the class that is given to the statusbar element seems to differ from the
vimrc-support-vim-mode
, i could only find theplugin-obsidian-vimrc-support
one. This would hint at a former class that is no longer set by the plugin. - the script now uses the
.setText(this.currentVimStatus)
method to change the shown text, which as of now is the colored emoji circle, but does not use any.setAttribute()
to add thedata-vim-mode="<normal|insert|visual>"
attribute.
All things considered the css snippet is surely based on an old version of the plugin. I managed to hack the script a little to validate my suspicions -got the text change working or the attribute set- but i have zero experience with obsidian and CodeMirror APIs so I don't trust what i wrote for now.