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

Function goLineStartText

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

Source from the content-addressed store, hash-verified

157 cm.setCursor(start);
158 }
159 function goLineStartText(cm) {
160 // Go to the start of the line where the text begins, or the end for whitespace-only lines
161 var cur = cm.getCursor(), firstNonWS = cm.getLine(cur.line).search(/\S/);
162 cm.setCursor(cur.line, firstNonWS == -1 ? line.length : firstNonWS, true);
163 }
164
165 function charIdxInLine(cm, cHar, motion_options) {
166 // Search for cHar in line.

Callers 1

vim.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected