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

Method moveClassBoundary

src/actions/languages/python/motion.ts:181–195  ·  view source on GitHub ↗
(
    document: TextDocument,
    position: Position,
    vimState: VimState,
    forward: boolean,
    start: boolean,
  )

Source from the content-addressed store, hash-verified

179
180 // Use PythonDocument instance to move to specified class boundary
181 static moveClassBoundary(
182 document: TextDocument,
183 position: Position,
184 vimState: VimState,
185 forward: boolean,
186 start: boolean,
187 ): Position | IMovement {
188 const direction = forward ? 'next' : 'prev';
189 const edge = start ? 'start' : 'end';
190
191 return (
192 new PythonDocument(document).find('class', direction, edge, position) ??
193 failedMovement(vimState)
194 );
195 }
196}
197
198// Uses the specified findFunction to execute the motion coupled to the shortcut (keys)

Callers 1

execActionFunction · 0.80

Calls 2

failedMovementFunction · 0.90
findMethod · 0.80

Tested by

no test coverage detected