Vim custom mapping

I’m trying to remap keys for the vim mode but I can’t seem to get everything working properly. I am using for example CodeMirror.Vim.noremap('d', 'g', 'normal'); This mostly works, but dd still deletes the current line instead of jumping to start of document, as well as a few other similar issues involving double keys.

Double-key actions like dd are handled independently by CodeMirror.
I have some double-key mappings working like this,'jj', '<Esc>', 'insert');.
So I think CodeMirror.Vim.noremap('dd', 'gg', 'normal'); will work for you.

I learned this through trial-and-error, so I don’t have any helpful links for you.
Maybe this is a little annoying to setup, but it’s worked well for me and I only have a few mappings.
I’m not sure what kind of delay between key presses would cross CodeMirror’s threshold to be treated as two separate actions…that’s another helpful factoid I wish I could give you now :slight_smile:.