Dear @santi,
Thank you for the explanation!
Unfortunately, I still can’t seem to find the .vimrc file anywhere.
I turned on the option to view hidden files as well.
Would I need to create/touch this file or is it automatically created?
The odd thing is I see the .obsidian file whether or not I have the option to view hidden files toggled on or off.
Hi santi, I’ve been trying to get my escape key mapped to jk. It is something that I’m familiar with - I have inoremap jk <esc> mapped in my .vimrc file, and map jk <Esc> in my .ideavimrc for PyCharm.
For some reason, I’m struggling to get it working with Obsidian.
I’ve followed the instructions so that:
Editor → Vim Key Bindings is Enabled.
Comunity Plugins → Vimrc Support is Enabled
In the root of my vault, I’ve created a file called .obsidian.vimrc and inside this file I have just these two lines
Resolved - I was editing .obsidian.vimrc on my vault that was located in a different location.
I have the same vault on DropBox and iCloud. I recently moved it to iCloud so that I can continue to work on Obsidian mobile … Anyway, I was making a change to.obsidian.vimrc on my Dropbox vault, but opening up the vault on iCloud.
For others that may encounter this issue, one of the things I found helpful was to type in the command in obsidian.
So, in obsidian, I typed in : imap jk <Esc> and verified that this worked. When it did, I found it strange that the change was not persistent when obsidian restarted. So that’s when I realized that the change I made was not the right .obsidian.vimrc file.
Just putting this solution to a common problem here so that it can be found.
On Windows, Ctrl-C needs to be remapped to make it copy selected text in vim mode. Several people recommend putting unmap <C-c> into the .obsidian.vimrc file but that does not work.
What works is iunmap <C-c> — the troublesome mapping is only operative in insert mode, so you need to unmap it with a preceding i
Sorry,I am working on the Windows, but I Set “Vimrc file name” = “C:\Users\ryanzhuo.obsidian.vimrc”, i put the file named “.obsidian.vimrc” which has been written “set clipboard=unnamed”, but it didn’t work.
Yes: if you typed C:\Users\ryanzhuo.obsidian.vimrc literally, it won’t work. You need to set the vimrc file name to C:\Users\ryanzhuo\YOURVAULTNAME\.obsidian.vimrc — with a slash after ryanzhou\YOURVAULTNAME and a period after that. (assuming that your vault isn’t just called ryanzhou!)
Omg!!!, You are right, Thanks a lot, I found what’s wrong in my settings, It works when I put the file into the workspace, which is the vault you mentioned. I am unfamiliar to Obsidian’s terminology,Such as vault, But I will Keep learning, Thank you for teaching me.
imap jk <Esc> worked before 0.13.14 version. With latest preview version does not work any longer. Has anyone found a solution already (was too nice when it worked)?
I noticed the the return key does nothing in normal mode. In all my other vim instances it goes to the beginning of the next line w/o leaving normal mode. Any idea how to get this working in Obsidian?
(I don’t know how to get it working. There might be a way. But just remember it isn’t a full-featured Vim. You might have to make a feature request on that project.)