Open Gatongone opened 3 years ago
FYI I've found that while mapping to <ESC>
does not work, mapping to <C-[>
does. I've also found that while inoremap
isn't working properly, imap
is.
It's probably a CodeMirror limitation and maybe I can work around it, I'll look into it when I get a few hours to work on the plugin.
FYI I've found that while mapping to
<ESC>
does not work, mapping to<C-[>
does. I've also found that whileinoremap
isn't working properly,imap
is.
I think it's CodeMirror limitations.
For example, instead of <ESC>
try use <Esc>
.
https://github.com/codemirror/CodeMirror/blob/58bb622cfc210af2c1adcd50a55971fd0d631bfb/keymap/vim.js#L63
About inoremap
, there just no such mapping
https://github.com/codemirror/CodeMirror/blob/58bb622cfc210af2c1adcd50a55971fd0d631bfb/keymap/vim.js#L230-L234
I created https://github.com/esm7/obsidian-vimrc-support/issues/24 as a stand-alone issue, since it seems like there are many use cases for inoremap
and it's very easy to implement.
It's probably a CodeMirror limitation and maybe I can work around it, I'll look into it when I get a few hours to work on the plugin.
Thanks
It's not related to this issue but, my .obsidian.vimrc is not working, probably I'm missing something, any idea?
Here is my folder tree (vault root):
Here is the content of it:
It's not related to this issue but, my .obsidian.vimrc is not working, probably I'm missing something, any idea?
Here is my folder tree (vault root):
Here is the content of it:
If you're sure that the Vimrc plugin is installed & enabled, can you please open a separate issue for this, hopefully also together with any logs you may have in the development console (press Ctrl+Shift+I and copy what's in the Console tab)?
Definitely subscribing to this issue. I want to use vim mode but not being able to rebind escape is a non starter for me.
Hey @patrick-motard is it working for you now? I set this plugin up and mapped Esc key to jj and works for me.
For example, instead of
<ESC>
try use<Esc>
.
this is the solution, btw. <Esc>
works flawlessly.
@RIT3shSapata I followed the suggested approach and was able to rebind escape using:
imap fd <Esc>
For example, instead of
<ESC>
try use<Esc>
.
@velixor how unobvious it is. Ty man
Not working for me still even with Esc
(uppercase E
, lowercase sc
) - and incredibly annoying
@sachasmart - I'm wondering if your vimrc file is set up correctly in Obsidian. Can you confirm the following for us?
Lets assume your vault is in ~/Documents/vault/
and your rc file is called .obsidian.vimrc
.
~/Documents/vault/.obsidian.vimrc
imap fd <Esc>
- this rules out any other settings in the file causing issues..obsidian.vimrc
If you can try this and let us know if it works or not, we can rule out several possible places where an issue could be in your setup.
Thank you for your nice plugin.
I found that the key cannot be mapped during the process of using the plugin.
I am personally used to map the switch of Normal mode and Insert mode to the key.
Can you support the mapping of the key?