MCPcopy
hub / github.com/VSCodeVim/Vim / getWordRightInText

Function getWordRightInText

src/textobject/word.ts:48–54  ·  view source on GitHub ↗
(
  text: string,
  pos: number,
  wordType: WordType,
)

Source from the content-addressed store, hash-verified

46}
47
48export function getWordRightInText(
49 text: string,
50 pos: number,
51 wordType: WordType,
52): number | undefined {
53 return getAllPositions(text, regexForWordType(wordType)).find((index) => index > pos);
54}
55
56export function prevWordStart(
57 document: TextDocument,

Callers 1

wordRightFunction · 0.90

Calls 3

getAllPositionsFunction · 0.90
regexForWordTypeFunction · 0.85
findMethod · 0.80

Tested by

no test coverage detected