micro-editor / micro-editor/micro

Confusion over missing bindings

Open
#3,314 0 comments 0 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

Issue

Whilst configuring bindings in $HOME/.config/micro/bindings.json, I encountered the following error:

Error in bindings: action InsertSpace does not exist

Confusion

This was strange to me, as the documentation for key bindings clearly states the existence of an InsertSpace value as a bindable key. It seems as though this list is currently not only incomplete, but also has some wrong values that have stuck there for years, notably the presence of InsertSpace.

Related issues and pull request

This has led me to stumble upon various issues and a pull request, none of which having been addressed for a few years at this point.
Notably, these:

Why make this issue?

This can be marked as duplicate, but I feel as though bringing everything in a single place and putting some more recent attention to the issue may be for the best at this point in time. The relevant open issues are still open to be addresses individually, if needs be.

Possible fixes

  • Removing InsertSpace from the documentation

Whilst this would be the least ideal solution, it would at least clear up the confusion. This is a simple one-liner change. Additionally, if needs be, any further tweak/fix to the documentation would be ideal if this issue already has a solution that is not documented clearly.

  • Re-adding the InsertSpace keybind

This would solve the issue at hand, and the documentation would not have to be changed.

  • Ability to bind any standard key

This is, after the first solution, both the least and best way to tackle the issue; It could take a lot of effort that could be spent elsewhere, and it may break things, but it would also fix the issue and give the users a much greater amount of customizability.

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 with runtime/help/keybindings.md and compare its documented bindable actions with the reported bindings.json error for InsertSpace. Review issue #2448 and pull request #2597 before choosing whether to correct the documentation or restore the binding. Done means the documentation and actual binding behavior agree, with the selected resolution reflected consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.