micro-editor / micro-editor/micro

Higher priority for "wrapping" symbols in `(Sub)?Word` navigation mode

Open
#3,988 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description

The main idea would be is to grant a higher priority to the quotes [`"']+ over other \W symbols. As they're used to wrap content up and it is important to respect their boundaries.

  • "(?s)(?:some|ThInG).*$"
    Trying to delete/navigate through similar RegEx, it currently yoinks "(? and ).*$", but would be much preferable if it were split into " <= (? <= ... and ... => ).*$ => " respectively.

Optionally, and perhaps exclusively for the SubWord mode, can similar logic be applied to brackets, parentheses, or any other paired delimiters, that do not match its closing/opening pair?

Or in the "back-to-back" position ( e.g. )(, ],{ ), which is often the case with RegEx or nested data structures.

  • [(),[],{}] or {[[()]]}
    These sequences would be wiped from any position to start/end, but when properly separated by \s characters [ (), [], {} ], { [ [ () ] ] } they are treated as expected.
    Could be useful when working with string formatting patterns ( e.g. f"Items: {[z,x.c,v]}", $"{}/{}/{}.{($ext)}" ), or building some poorly designed data structure

With SubWord mode being considered less hasty and more precise, perhaps it is a good idea? Then again, maybe it's just me whining, as the default navigation mode already does that, so no pressure here.

@masmu

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the quoted and back-to-back delimiter examples in (Sub)?Word navigation mode. The issue names no files, tests, or entry points, so first locate the navigation-mode implementation and existing tests; clarify whether quote priority, paired delimiters, or both are in scope, then define expected cursor and deletion boundaries before changing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.