Move cursor to the mouse click position
<LeftMouse>
Example
Normal 0 / 1Normal 1 / 1one two
three fourCursor on line 1, column 1one two
three fourCursor on line 2, column 7Move cursor to the mouse click position.
Prepared mouse event
- Click
line 2, column 7 (f in four)- Options
mouse=a · mousemodel=extend · selectmode empty
Click line 2, column 7 to place the cursor on four.
Prepared mouse event
- Click
line 2, column 7 (f in four)- Options
mouse=a · mousemodel=extend · selectmode empty
Before & after
one two
three fourCursor on line 1, column 1Prepared mouse event
- Click
line 2, column 7 (f in four)- Options
mouse=a · mousemodel=extend · selectmode empty
one two
three fourCursor on line 2, column 7Prepared mouse event
- Click
line 2, column 7 (f in four)- Options
mouse=a · mousemodel=extend · selectmode empty
ILLUSTRATION. mouse=a, mousemodel=extend, selectmode empty, scrolloff=0; terminal/GUI mouse events reach Vim. Coordinates are one-based buffer line and column.
Details & Vim help
Move cursor to the mouse click position. Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative. Mouse support and terminal/GUI event handling must be available.