Skip to main content

Module cursor

Module cursor 

Source
Expand description

Cursor utilities for text editing

Translated from openclaudecode/src/utils/Cursor.ts

Structs§

YankPopResult
Result from yank-pop operation

Statics§

VIM_WORD_CHAR_REGEX
WHITESPACE_REGEX

Functions§

can_yank_pop
Check if yank-pop is possible
clear_kill_ring
Clear the kill ring
get_kill_ring_item
Get an item from the kill ring by index
get_kill_ring_size
Get the size of the kill ring
get_last_kill
Get the last kill from the ring
is_vim_punctuation
Check if character is Vim punctuation
is_vim_whitespace
Check if character is whitespace
is_vim_word_char
Check if character is a Vim word character (letter, digit, underscore)
push_to_kill_ring
Push text to the kill ring
record_yank
Record a yank for yank-pop functionality
reset_kill_accumulation
Reset kill accumulation state
reset_yank_state
Reset yank state
update_yank_length
Update the yank length
yank_pop
Perform yank-pop operation