Skip to content

Enhance snippet navigation and cursor tracking functionality#31

Open
nguyenanhduc09 wants to merge 1 commit intothgcode:masterfrom
nguyenanhduc09:Contributed-by-Anh-Duc
Open

Enhance snippet navigation and cursor tracking functionality#31
nguyenanhduc09 wants to merge 1 commit intothgcode:masterfrom
nguyenanhduc09:Contributed-by-Anh-Duc

Conversation

@nguyenanhduc09
Copy link

Introduce per-slot cursor tracking and interactive navigation for saved snippets: next/previous character, word, and line commands with localized names for special characters. Add helper functions for word/line parsing and a small _get_char_name utility; import re for parsing. Track current selected memory slot and initialize cursors when a slot is opened. Expand gesture mappings to include navigation shortcuts and many additional memory slots (minus/equals, numpad keys, backspace/numpadPlus/numpadMinus), and wire gestures for next/prev char/word/line. Also set current_slot_key to None when an empty slot is accessed.

Introduce per-slot cursor tracking and interactive navigation for saved snippets: next/previous character, word, and line commands with localized names for special characters. Add helper functions for word/line parsing and a small _get_char_name utility; import re for parsing. Track current selected memory slot and initialize cursors when a slot is opened. Expand gesture mappings to include navigation shortcuts and many additional memory slots (minus/equals, numpad keys, backspace/numpadPlus/numpadMinus), and wire gestures for next/prev char/word/line. Also set current_slot_key to None when an empty slot is accessed.
@thgcode
Copy link
Owner

thgcode commented Mar 4, 2026

Hello!
Thank you for the contribution!
I have a question, I don't know your specific use case, but would it be easier to instead of having the implement the cursor code ourselves, the addon would display a browseable message with the snippet contents, so you could navigate by character, words or lines, and even also copy some specific parts you need? So the navigation code if there is a bug, can be fixed on the review cursor code itself and not on ours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants