MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / getVimGlobalState

Function getVimGlobalState

static/js/codemirror/keymap/vim.js:321–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

319 // Global Vim state. Call getVimGlobalState to get and initialize.
320 var vimGlobalState;
321 function getVimGlobalState() {
322 if (!vimGlobalState) {
323 vimGlobalState = {
324 // The current search query.
325 searchQuery: null,
326 // Whether we are searching backwards.
327 searchIsReversed: false,
328 registerController: new RegisterController({})
329 };
330 }
331 return vimGlobalState;
332 }
333 function getVimState(cm) {
334 if (!cm.vimState) {
335 // Store instance state in the CodeMirror object.

Callers 1

VimFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected