MCPcopy Index your code
hub / github.com/philc/vimium / selectLexicalEntity

Method selectLexicalEntity

content_scripts/mode_visual.js:189–203  ·  view source on GitHub ↗
(entity, count)

Source from the content-addressed store, hash-verified

187 // For "aw", "as". We don't do "ap" (for paragraphs), because Chrome paragraph movements are
188 // weird.
189 selectLexicalEntity(entity, count) {
190 if (count == null) {
191 count = 1;
192 }
193 this.collapseSelectionToFocus();
194 // This makes word movements a bit more vim-like.
195 if (entity === word) {
196 this.runMovement([forward, character]);
197 }
198 this.runMovement([backward, entity]);
199 this.collapseSelectionToFocus();
200 for (let i = 0, end = count; i < end; i++) {
201 this.runMovement([forward, entity]);
202 }
203 }
204
205 selectLine(count) {
206 // Even under caret mode, we still need an extended selection here.

Callers 2

"aw"Function · 0.80
"as"Function · 0.80

Calls 2

runMovementMethod · 0.95

Tested by

no test coverage detected