Last active
August 28, 2023 05:54
-
-
Save neuromaancer/9bc000265d6d773d3c1170d66a5ada3f to your computer and use it in GitHub Desktop.
Revisions
-
neuromaancer revised this gist
Aug 28, 2023 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,5 +26,8 @@ CodeMirrorVim.Vim.map("H", "g^", "visual"); CodeMirrorVim.Vim.map("L", "g%", "visual"); //delete the {}, [] CodeMirrorVim.Vim.map("sd{", "di{va{p", "normal"); CodeMirrorVim.Vim.map("sd[", "di[va[p", "normal"); }); })(); -
neuromaancer created this gist
Aug 17, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ // ==UserScript== // @name Overleaf Editor Custom VIM Keybindings // @namespace http://tampermonkey.net/ // @version 0.1 // @match https://www.overleaf.com/project/* // @grant none // ==/UserScript== (function() { 'use strict'; window.addEventListener("UNSTABLE_editor:extensions", (event) => { const { CodeMirror, CodeMirrorVim, extensions } = event.detail; // add custom keybindings - insert mode applies on insert CodeMirrorVim.Vim.map("jk", "<Esc>", "insert"); // normal mode applies while escaped CodeMirrorVim.Vim.map("j", "gj", "normal"); CodeMirrorVim.Vim.map("k", "gk", "normal"); CodeMirrorVim.Vim.map("j", "gj", "visual"); CodeMirrorVim.Vim.map("k", "gk", "visual"); CodeMirrorVim.Vim.map("H", "g^", "normal"); CodeMirrorVim.Vim.map("L", "g%", "normal"); CodeMirrorVim.Vim.map("H", "g^", "visual"); CodeMirrorVim.Vim.map("L", "g%", "visual"); }); })();