// ==UserScript== // @name Overleaf Custom Vim bindings // @match https://www.overleaf.com/project/* // @version 0.1 // @description Injecting custom vim settings in overleaf project. CodeMirror 6 editor only. // @author cyrillkuettel // @match https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo/related?hl=de // @grant none // ==/UserScript== (function() { 'use strict'; window.addEventListener('UNSTABLE_editor:extensions', (event) => { const retry = setInterval(() => { //console.log(event); const { CodeMirrorVim, extensions } = event.detail if (CodeMirrorVim.Vim == undefined) { return; } CodeMirrorVim.Vim.map('jk', '', 'insert') console.log("Custom key bindings applied") }, 100); }) })();