obsidian-vimrc-support
obsidian-vimrc-support copied to clipboard
Unable to remap `cc`
It has always bothered me that using cc inside of a list, it clears the whole line including the list index - or 1. . So I wrote my own JS snippet to clear the current line just after those - , 1. , > , - [x] and whatsoever. It works as expected (tested in Obsidian interactively), but I'm having trouble mapping it in the .vimrc file.
Here's my .vimrc:
unmap cc
exmap clearLine jsfile mdHelpers.js { clearLine() }
nmap & :clearLine
nmap cc &a " In order to enter insert mode after the line is cleared
It does not change the behaviour of cc. Yet the same mapping with some other key instead (i.e. gc) works perfectly.
Any idea how to fix that?
Seems like the CodeMirror Vim integration doesn't allow to map cc, among its many strange quirks :shrug: