obsidian-vimrc-support
obsidian-vimrc-support copied to clipboard
Need help with simple remap
I'm a noncoder trying to implement simple vim-mode mappings. They are:
set clipboard=unnamed
map k gk
map j gj
map H ^
map L $
map jj <ESC>
The H
and L
remaps don't work. Neither does the <ESC>
. remap.
I started with noremap
mappings. On suggestions encountered here I also tried imap
and map
. With <ESC> I also tried inoremap
I'm guessing none of the is right for <ESC>
.
Help appreciated.
Have a try as below:
nmap H ^
nmap L $
imap jj <Esc>
for this mapping:
map jj <ESC>
perfectly work this one
imap jj <Esc>
I have these:
nmap H ^
nmap L $
imap jj <ESC>
nmap H ^
Takes cursor to top of file.
nmap L $
Takes cursor to bottom of file.
imap jj <ESC>
Enters jj
I have vimrc-support plugin enabled. Also Obsidian vim key bindings.
If anybody has a clue about why these key bindings aren't working for me I'd greatly appreciate help. I gather they work for others.Especially miss the <ESC> binding on my mobile devices.
Again, Obsidian's vim key bindings and the vimrc-support plugin are enabled on all devices.
If anybody has a clue about why these key bindings aren't working for me I'd greatly appreciate help. I gather they work for others.Especially miss the binding on my mobile devices.
Again, Obsidian's vim key bindings and the vimrc-support plugin are enabled on all devices.
Hello, try this:
- Create file
.obsidian.vimrc
- Write in this file next lines:
imap jj <Esc>
nmap H gg
nmap L G
- copy this file to your current obsidian vault-folder
- switch on vim mode
- reload the program
Thanks. I tried it. Same results.
gg
and G
don't need to be mapped. It seems they're already provided for in Obsidians native vim mode
Hi @EricEWeir, I had a similar issue, and I cannot reproduce how I fixed it, but I will share my experience. I had a .obsidian.vimrc with:
nmap j gj
nmap k gk, both worked
a few lines below, I had
imap jk <Esc>, and jk in insert mode didn't work.
I had a combination of issues: I wrote originally "ESC" instead of "Esc", corrected and no changes. My configuration started to work once I moved the imap jk <Esc> line at the beginning of my .obsidian.vimrc, and I commented the nmap lines. What is interesting is that I moved back to where it was originally, and I uncommented the nmap lines, and all mappings works without issues.
I have Obsidian v1.1.15 installed with Vimrc support plugin 0.9.0