Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks
sbom641 opened this issue Aug 3, 2024 · 3 comments
Closed
2 tasks

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

sbom641 opened this issue Aug 3, 2024 · 3 comments

Comments

@sbom641
Copy link

sbom641 commented Aug 3, 2024

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
Copy link

oars commented Aug 5, 2024

Seeing this as well.

esm7 added a commit that referenced this issue Aug 8, 2024
(and a version bump)
@esm7
Copy link
Owner

esm7 commented Aug 8, 2024

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

@esm7 esm7 closed this as completed Aug 8, 2024
@gordonn
Copy link

gordonn commented Aug 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants