rust-lang / rust-lang/rust-mode

Please consider easier to type default keybindings for cargo actions

Open
#491 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Emacs Lisp
Stars
1.3k
Forks
198
PR merge metrics
No merged PRs in 30d

Description

The default keybindings for running cargo actions are

  • C-c C-c C-u rust-compile
  • C-c C-c C-k rust-check
  • C-c C-c C-r rust-run
  • C-c C-c C-t rust-test
  • C-c C-c C-l rust-run-clippy

When touch-typing, these are quite difficult to type, requiring first using one Ctrl-key and then the other.

While it is common among Emacs modes to use C-c C-c for "finishing" or "building" something, I am not aware of a tradition of continuing with C-<letter> after the prefix. Nor seems there to be such a necessity, since any key binding after the C-c C-c prefix is still free.

How about redefining the above such that a simple letter chooses the action, for example:

  • C-c C-c u rust-compile (although one may ask why "u" for compile/build)
  • C-c C-c k rust-check
  • C-c C-c r rust-run
  • C-c C-c t rust-test
  • C-c C-c l rust-run-clippy

I am aware that anyone may redefine keybindings, and this is what I did. I am signalling this here because I believe that a good default configuration is valuable.

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

Locate the default keybinding definitions for rust-compile, rust-check, rust-run, rust-test, and rust-run-clippy, then review how their C-c C-c bindings are declared. Update the defaults if appropriate and verify that each command is reachable through the proposed single-letter suffixes without conflicting bindings.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp, rust
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.