MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / toCombo

Function toCombo

mini-code-edit/cm/keymap/vim.js:86–93  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

84 }
85 var SPECIAL_SYMBOLS = "~`!@#$%^&*()_-+=[{}]\\|/?.,<>:;\"\'1234567890";
86 function toCombo(ch) {
87 // t -> T, T -> Shift-T, * -> '*', " " -> "Space"
88 if (ch == " ") return "Space";
89 var specialIdx = SPECIAL_SYMBOLS.indexOf(ch);
90 if (specialIdx != -1) return "'" + ch + "'";
91 if (ch.toLowerCase() == ch) return ch.toUpperCase();
92 return "Shift-" + ch.toUpperCase();
93 }
94
95 var word = [/\w/, /[^\w\s]/], bigWord = [/\S/];
96 function findWord(line, pos, dir, regexps) {

Callers 1

vim.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected