Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Tag entries that use navigation keys with ⚠ #284

Open
sunwukonga opened this issue Mar 9, 2020 · 1 comment
Open

Comments

@sunwukonga
Copy link

sunwukonga commented Mar 9, 2020

Navigation keys: <Down> <Left> <Right> <Up> <Home> <End> <Pgdn> <Pgup>, and any <C-> that combines with them.

Purpose: shortcut for anyone searching for an optimal solution, but who does NOT include solutions containing navigation keys in that search space.

Suggestion: a largish orange warning sign (⚠; UNICODEU+026A0; HTML CODE&#9888) added to any matching leader board entries, with the tooltip "This entry contains one or more navigation key presses".

Non-home-key-warning

@danilobellini
Copy link

Arrow keys alone in normal mode make no difference in keystroke count. In this case, marking the solution with the exclamation point glyph would look like an indicator that the user should use hjkl instead. But in insert/replace modes these keys/combinations make difference (<C-o>k instead of <Up> would increase the keystroke count). And <C-End> in normal mode is the same of G$ with 1 keystroke instead of 2. Replacing <C-Home> by gg or 1G in normal mode would not be optimal either. That said, these are valid keys that might be required to achieve the optimal solution, and there's no real benefit in constraining any of these (except perhaps the <PageUp> and <PageDown>). I'm not against showing a glyph meaning "used an arrow key instead of hjkl" but this would require a mode-aware lookup, and extending this to <C-Home> and <C-End> would be a major change to the golf rules.

On the other hand, H, M, L, gm, <C-D/U/F/B> (all in normal mode), and other screen-based motions (like <PageUp> and <PageDown>) should be marked with a red sign, or preferably banned (or the terminal size should be enforced, e.g. by "playing" the record in an terminal-size-enforced environment before accepting it). H/M/L make it possible to create an arbitrary line jump with a single keystroke just by tweaking the number of terminal lines, and that's a real issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants