1.0k GitHub stars and counting — bbatsov/crux is a Emacs Lisp project TopGit is tracking across repositories on the platform. A Collection of Ridiculously Useful eXtensions for Emacs
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
A Collection of Ridiculously Useful eXtensions for Emacs.
crux bundles many useful interactive commands to enhance your
overall Emacs experience.
Most of the crux commands are related to the editing experience, but
there are also a bunch of utility commands that are just very useful
to have (e.g. crux-open-with and crux-reopen-as-root).
Origins of crux
Many of the functions in crux started life as blog posts on
Emacs Redux, then were included in
Emacs Prelude, before finally
being extracted
to crux. You can see a full list of blog posts on functions
in crux on the tags page.
Installation
crux requires Emacs 28.1 or newer.
It's available on all major package.el community maintained repos -
MELPA Stable and MELPA repos.
MELPA Stable is recommended as it has the latest stable version.
MELPA has a development snapshot for users who don't mind breakage but
don't want to run from a git checkout.
You can install crux using the following command:
M-x package-install [RET] crux [RET]
If the installation doesn't work try refreshing the package list:
M-x package-refresh-contents
Alternatively, you can add the following code to your Emacs config:
crux ships with some handy advice that can enhance the operation of existing commands.
(crux-with-region-or-buffer)
You can use crux-with-region-or-buffer to make a command acting
normally on a region to operate on the entire buffer in the absence of
a region. Here are a few examples you can stuff in your config:
Similarly, crux-with-region-or-sexp-or-line makes a command that acts on the active region, or else
the current list (or string), or finally the current line:
(crux-with-region-or-sexp-or-line kill-region)
(crux-with-region-or-point-to-eol)
Sometimes you might want to act on the point until the end of the
current line, rather than the whole line, in the absence of a region:
(crux-with-region-or-point-to-eol kill-ring-save)
Configuration
Most commands work fine out of the box, but a few of them can be tuned
via M-x customize-group RET crux:
crux-move-visually - when non-nil, the line start commands work on
visual lines instead of logical ones.
crux-line-start-regex-alist - per-mode regexps describing what
crux-move-beginning-of-line should skip at the start of a line
(shell prompts, Org heading stars and so on).
crux-indent-sensitive-modes and crux-untabify-sensitive-modes -
modes (and their derived modes) where crux-cleanup-buffer-or-region
won't reindent or untabify.
crux-term-func and crux-shell-func - how crux-visit-term-buffer
and crux-visit-shell-buffer start their buffers. crux-shell is
the shell program used by the default crux-term-func, and there's a
crux-shell function you can use for crux-shell-func if you prefer
M-x shell to Eshell.
crux-shell-zsh-init-files, crux-shell-bash-init-files,
crux-shell-tcsh-init-files, crux-shell-fish-init-files and
crux-shell-ksh-init-files - the files crux-find-shell-init-file
looks for.
crux-term-buffer-name and crux-shell-buffer-name set the names of
the terminal and shell buffers. They're safe to set in .dir-locals.el
if you want a separate terminal per project.
Built-in alternatives
Newer Emacs versions ship commands that overlap with some of crux's. If
you're on a recent Emacs you might prefer them:
crux command
Built-in alternative
crux-duplicate-current-line-or-region
duplicate-dwim (Emacs 29.1)
crux-recentf-find-file
recentf-open (Emacs 29.1)
crux-rename-file-and-buffer
rename-visited-file (Emacs 29.1), though it doesn't go through VC
crux-sudo-edit
tramp-revert-buffer-with-sudo (Emacs 30.1)
crux-open-with (in Dired)
dired-do-open (Emacs 30.1)
crux-indent-defun
prog-fill-reindent-defun on M-q (Emacs 30.1)
crux-switch-to-previous-buffer
mode-line-other-buffer
crux-upcase-region and friends
upcase-dwim, downcase-dwim and capitalize-dwim, which fall back to the word at point instead of doing nothing
Minor modes
(crux-reopen-as-root-mode)
Crux provides a crux-reopen-as-root command for reopening a file as
root. This global minor mode changes find-file so all root files are
automatically opened as root.
The most recent commit recorded on bbatsov/crux was 1 month ago, based on the GitHub push timestamp. The repository has 52 forks — one of the better signals of community interest.
How many stars does bbatsov/crux have?
bbatsov/crux has 1.0k GitHub stars — refresh the page for the live number, or check github.com/bbatsov/crux. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What is bbatsov/crux?
bbatsov/crux (bbatsov/crux) is a Emacs Lisp project on GitHub. From the project's own README: A Collection of Ridiculously Useful eXtensions for Emacs
What language is bbatsov/crux written in?
bbatsov/crux is written primarily in Emacs Lisp. GitHub's language field is based on the largest share of bytes in the default branch.
What topics is bbatsov/crux associated with?
GitHub's repository topics for bbatsov/crux: "emacs", "emacs-lisp". TopGit's editorial category is open-source.
Read full README in the tab above.
Is crux worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of crux.