micro-editor / micro-editor/micro

Feature request: marker-based selection

Open
#1,174 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The ability to use Shift+arrows etc to select text is arguably one of the best features of micro. The problem is that it's very much contingent on terminal support, and some terminals don't provide any means of detecting modifiers on navigation keys at all (e.g. FreeBSD vt).

Currently, working around this requires rebinding a bunch of selection commands to some arbitrary keys; however, when those keys aren't navigation keys + modifier because such aren't supported by the terminal, it's nearly impossible to remember those bindings.

The traditional way to handle selection in Unix text-mode editors is to use selection markers a la WordStar - basically a single keybinding to enter selection mode, in which all navigation keys without modifiers select stuff; and another keybinding to exit that mode, accepting current selections. Some editors, like mcedit, use a single keybinding for both operations.

It would be nice to have this as a bindable command in micro, for use with those funky terminals without having to abandon micro entirely.

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

Start by tracing micro's existing selection commands, navigation-key handling, and bindable command definitions. Check how terminal modifier input is represented, especially for FreeBSD vt, and clarify marker-mode entry and exit semantics. Done means users can bind the mode and navigation keys select text without terminal modifiers.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.