micro-editor / micro-editor/micro
"Error reading bindings.json: invalid character 'x' in string escape code"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description of the problem or steps to reproduce
Following the custom keybind docs page, I'm trying to bind Ctrl-/ to Undo to replicate the default emacs setup. I used the "raw" command to see what micro thought this key sequence was, and got
EventKey: Ctrl-_: "\x1f"
So in my bindings.json I added
"\x1f": "Undo",
But when I relaunched micro, I got this error:
Error reading bindings.json: invalid character 'x' in string escape code
Is there any way I can bind something to Ctrl /?
Specifications
Commit hash: 5044ccf6 (2.0.7)
OS: Manjaro Linux
Terminal: Gnome Terminal
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the custom keybind docs page and the bindings.json entry described in the report, then trace how the raw command represents Ctrl-/ and how bindings.json parses escape sequences. Reproduce the error on the reported 2.0.7 setup or an equivalent checkout. Done means Ctrl-/ can be assigned to Undo without the configuration error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100