vercel / vercel/hyper

Text Navigation (Ctrl + arrow)

Open
#1,047 24 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🛠 Type: Feature Request
Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

When editing text (coming from a windows background), I like to use Ctrl+left/right arrow for jumping from word to word. I'd like to be able to do this in Hyper as well.

I've been able to get this behavior on mac by using a DefaultKeyBinding.dict (Karabiner is currently broken on mac sierra)...

"^\UF702" = "moveWordBackward:";
"^\UF703" = "moveWordForward:";

...since electron-based apps obviously don't respect DefaultKeyBinding.dict, I got this to work in atom (keymap.cson) using...

'ctrl-left': 'editor:move-to-beginning-of-word'
'ctrl-right': 'editor:move-to-end-of-word'

It looks like there's some discussion around adding something like this to hyper, but in the meantime, anyone else run into this or have any solutions to offer? Thanks.

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 reading the discussion in pull request 925 and compare the macOS DefaultKeyBinding.dict and Atom keymap.cson examples in this issue. Trace Hyper's keyboard handling entry point to determine where Ctrl+left/right should be mapped; done means word-by-word navigation works while editing text on macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, macos
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.