cm-typewriter-scroll-obsidian
cm-typewriter-scroll-obsidian copied to clipboard
Not working in Vim's normal mode
This is a wonderful plugin! I use Vim mode and I noticed when I'm in insert mode it works as expected, but when I'm in normal mode it behaves like normal and the cursor doesn't stay in the center of the screen. When I return to insert mode and move the cursor, the current line is centered as expected.
Thanks. I don't use vim mode, so I wouldn't have caught this 😅
Interestingly, the "cursorActivity" event isn't being fired by CodeMirror when in vim mode. I wonder if there's some other event I should be tapping in to...
I tried to look into this a bit more, but I've got no idea what I'm looking at, so I'm marking this as "help wanted" and will come back to it another time
Hey, I think this might be working as of the latest commit 🤞
Hi, I tested it and it works for me! Thank you! You can make another release, I guess :)
Hey, it doesn't work for me. I'm running the latest version (obsidian and plugin) on mac with many plugins. any ideas or fixes?
@th4lmain Unfortunately, commit with the fix is not included in the latest release. I got it working by cloning the repo and manually copying relevant files into my plugin folder.
It's not working for me either. @deathau I think you have to publish a version with the last commit.
Not working for me. Had to copy changes in commit with fix to get it working.
@ChrisBarfod Could you describe what you did exactly? I can't seem to get it working, by unzipping cm-typewriter-scroll-obsidian-0.2.1.zip
from here (https://github.com/deathau/cm-typewriter-scroll-obsidian/releases/tag/0.2.1) and placing it in the plugins folder.
Looks like this might already be fixed. But I'll just add that vim normal mode works in the legacy editor. Perhaps useful as an alternative to manually applying the patch.
Edit: Though the center offset seems not to work in this case.
As of 0.2.2 this still doesn't work in the Live Preview editor. Can't see the magical patch people are referring to.
I know this is an old issue, but in case anyone stumbles on this in the future... Until this is added properly into this plugin, I recommend using this plugin: https://github.com/lijyze/scroll-offset. Set the distance to something like 999 and it will behave exactly like :scrolloff
in vim, even in vim normal mode.