A Collection of Ridiculously Useful eXtensions for Emacs. crux bundles a few useful interactive commands to enhance your overall Emacs experience.
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]
or if you'd rather keep it in your dotfiles:
(unless (package-installed-p 'crux)
(package-refresh-contents)
(package-install 'crux))
If the installation doesn't work try refreshing the package list:
M-x package-refresh-contents
crux doesn't setup any keybindings for its commands out-of-the-box.
Here's the list of some suggested keybindings. Feel free to bind individual commands to whatever keybindings you prefer.
crux-open-with
| C-c o | Open the currently visited file with an external program.
crux-smart-open-line-above
| C-S-RET or Super-o | Insert an empty line above the current line and indent it properly.
crux-smart-open-line
| S-RET or M-o | Insert an empty line and indent it properly (as in most IDEs).
crux-cleanup-buffer-or-region
| C-c n | Fix indentation in buffer and strip whitespace.
crux-recentf-ido-find-file
| C-c f or Super-r | Open recently visited file.
crux-view-url
| C-c u | Open a new buffer containing the contents of URL.
crux-eval-and-replace
| C-c e | Eval a bit of Emacs Lisp code and replace it with its result.
crux-swap-windows
| C-c s | Swap two active windows.
crux-delete-file-and-buffer
| C-c D | Delete current file and buffer.
crux-rename-file-and-buffer
| C-c r | Rename the current buffer and its visiting file if any.
crux-visit-term-buffer
| C-c t | Open a terminal emulator (ansi-term
).
crux-kill-other-buffers
| C-c k | Kill all open buffers except the one you're currently in.
crux-indent-rigidly-and-copy-to-clipboard
| C-c TAB | Indent and copy region to clipboard
crux-find-user-init-file
| C-c I | Open user's init file.
crux-find-shell-init-file
| C-c S | Open shell's init file.
crux-top-join-lines
| Super-j or C-^ | Join lines
crux-kill-whole-line
| Super-k | Kill whole line
crux-kill-line-backwards
| C-Backspace | Kill line backwards
Copyright © 2015 Bozhidar Batsov and contributors.
Distributed under the GNU General Public License; type C-h C-c to view it.