obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

vmap jk <Esc> don't work

Open BlackJoke76 opened this issue 10 months ago • 6 comments

BlackJoke76 avatar Mar 12 '25 10:03 BlackJoke76

My code : imap jk <Esc> Somebody sad, what can work. But mine don't work.

WongKaXing avatar Mar 13 '25 06:03 WongKaXing

For what its worth I was able to get the following to work: inoremap jk <Esc> inoremap jK <Esc> inoremap Jk <Esc> inoremap JK <Esc>

both inoremap and imap worked. The key issue here was that it had to be <Esc> not <esc> atleast for me.

CharlesHenryVIII avatar May 03 '25 07:05 CharlesHenryVIII

most likely on jk in visual mode there are other settings, in this case it may not work. It does not work for me in this case.

artemDvoryadkin avatar May 03 '25 10:05 artemDvoryadkin

就其价值而言,我能够让以下内容正常工作: inoremap jk <Esc> inoremap jK <Esc> inoremap Jk <Esc> inoremap JK <Esc>

两者都有效。这里的关键问题是,至少对我来说,这一定不是。inoremap``imap``<Esc>``<esc>

mine can't work

WongKaXing avatar Jul 02 '25 12:07 WongKaXing

情况

I don't konw Some experts have also mentioned this

WongKaXing avatar Jul 02 '25 12:07 WongKaXing

Works for me. Have you tried it on the latest versions?

📝 Obsidian v1.8.10 + Vimrc Support v0.10.2 as of this writing.

Also, make sure that the .obsidian.vimrc is inside your vault root. Try the following:

  1. Go and check your vault root directory

    $ cd /path/to/your/vault \
        && ls -A1
    
    .obsidian
    .obsidian.vimrc
    Welcome.md
    
  2. Make sure it’s <Esc> and not <esc>. For example:

    $ grep jj .obsidian.vimrc  
    
    imap jj <Esc>
    

copperwalls avatar Jul 15 '25 14:07 copperwalls