esm7/obsidian-vimrc-support

vimrc plugin unable to read/detect .obsidian.vimrc file

sbom641 opened this issue · 3 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:

I think obsidian plugin is not able to read the .obsidian.vimrc file I have created in the root directory.
This is the error I am getting from the console

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'setText')
    at VimrcPlugin.updateVimStatusBar (plugin:obsidian-vimrc-support:587:27)
    at VimrcPlugin.updateVimEvents (plugin:obsidian-vimrc-support:665:22)
    at eval (plugin:obsidian-vimrc-support:625:18)
    at e.tryTrigger (app.js:1:723190)
    at e.trigger (app.js:1:723123)
    at t.trigger (app.js:1:2283688)
    at t.activeLeafEvents (app.js:1:2269215)
    at l (app.js:1:522936)
    at c (app.js:1:523052)

To Reproduce:

Steps to reproduce the behavior: Not sure ?

Environment (please complete the following information):

  • Obsidian: v1.6.7
  • OS: Windows 11 22H2
  • Vimrc plugin version: 0.10.0

Additional context:

I wanted ctrl+d because for some reason the vim in obsidian by default is mapping ctrl + d to delete a line, while ctrl + U works as expected.
.obsidian.vimrc contents

" Map Tab to switch from insert mode to normal mode
inoremap <Tab> <Esc>

" Basic movement mappings
nnoremap <C-d> <C-d>
nnoremap <C-u> <C-u>

Any help would be appreciated.

oars commented

Seeing this as well.

esm7 commented

Thanks for reporting and the super helpful console error. Fixed in the new release.

I had the same issue, just simply changed the path to .vimrc instead of .obsidian.vimrc and changed the vimrc file name setting in the vimrc settings.