For some reason my imap jk <esc> worked for a minute and now just deletes the jk and remains in insert mode. Any ides?

imap jj <Esc> is working for me. Using Obsidian 0.10.0

2 Likes

thank you for providing this plugin

imap jk <ESC> deletes jk without exiting insert mode for me on OSX with Obisidan 0.10.6 and the obsidian-vimrc-support plugin

EDIT Changing this to imap jk <Esc> did the trick

1 Like

If I can use Vim navigation keys like j, k, ctrl+u, ctrl+d and search using /word in preview mode would be great. :smile:

1 Like

Here’s my latest struggle: I can navigate to the link under the cursor with Alt+Enter, but when I try to remap this using the following command, it doesn’t work. :frowning:
nmap gd <A-CR>

Anyone have any luck remapping this?

2 Likes

Does holding down one of the hjkl keys not work for you?

Hi, holdiing down j/k/l/h for moving the cursor indeed does not work for me. I have to resort to f command to move around in the same line.
Do you know any fix for this while we all waiting for the neovim backend?

1 Like

I found a fix for this on Mac, In Linux it worked without any issue, but with Mac there needs to be something done first

Here’s the solution if you are in mac

3 Likes

Thanks. That fixes it. Though the vim cursor is not responsive when hold down and only take effect when the key is released.
What even more weird is that I thought I have fixed this a while ago for my vim and terminal and stuff.

1 Like

that’s really strange I never had that kind of issue, is the cursor delay only happening in Obsidian is it an issue in your terminal / vim as well?

1 Like

Oh sorry, now it worked perfectly. Not sure why but I have restart Obsidian a few time since then. Thank again.
Edit: The vim cursor run smoothly on small file, but stutter and delay on large file
As in this GIF, at first the cursor move line by line smoothly on the note on the right, but only jump when I release the key on note on the left.
Screen Recording 2021-02-06 at 16.20.22

1 Like

hey my pleasure, happy to help! It’s a bit hard to see in the gif, but I think I know what you mean.

That’s strange though I’ve never had that problem, hope someone else can suggest solutions since I’m really not sure what might be causing that lag.

2 Likes

Please implement possibility to scroll page in rendered Preview mode with j and k keys.
I scroll pages in browser, IDE, pdf readers this way

4 Likes

that’d be amazing I also use j an k everywhere to scroll, this would be great!

4 Likes

I managed to achieve these using the “Obsidian Vimrc Support” plugin:

nmap j gj
nmap k gk
nmap $ 69|
nmap ^ 0|

CORRECT: ignore me, the last 2 are wrong!

Another way to reproduce the “unexpected unfold” behavior is to create a heading that’s long enough to wrap to a second line

# This is a very long heading that will most likely wrap to two lines in the editor

This is content inside the heading

# This is a second heading

If you fold the first heading, then use J to move from that heading to the second heading, the first one unfolds.

2 Likes

has anyone figured out how to implement the ctrl + d half page down and ctrl + u half page up? i keep deleting paragraphs because of muscle memory

I just unmapped the delete paragraph shortcut , works like a charm :wink:

2 Likes

Not sure if you already found it. For me, it comes from the ‘Relative line number’ plugin. No stuttering after disabling it. v0.12.15.

I was wonder why the following commands does not work.

imap <C-f> <Right>
imap <C-f> <Left>
imap <C-e> <Home>
imap <C-[> <Esc>