[[https://melpa.org/#/casual-editkit][file:https://melpa.org/packages/casual-editkit-badge.svg]]
[[file:docs/images/casual-editkit-main-screenshot.png]]
Casual EditKit endeavors to surface the many different editing commands offered by Emacs via Transient menus. Included in this library are menus for:
A main menu (~casual-editkit-main-tmenu~) demonstrating all of the above is provided as a reference model. This reference model can be used as is. More motivated users can use the reference model as a template to build their own customized menus.
** Goals
** Non-Goals
Full coverage of all Emacs editing commands. Casual EditKit is not intended to be a power user tool nor is it intended to be a replacement for mouse-driven menus.
Strict adherence to Emacs editing command naming. While Casual EditKit is mostly in alignment with Emacs command naming, there are cases where it will make an opinionated change if the name is deemed too vague or idiomatic.
UX Stability (for now). Given that Casual EditKit is early in its life-cycle, expect changes to its user experience in terms of menu hierarchy and keybinding choices in future releases.
Requirements Casual EditKit requires usage of
Emacs ≥ 29.1
Magit ≥ 4.0.0
Casual Lib ≥ 1.1.0
Casual Symbol Overlay ≥ 1.0.1
transpose-frame ≥ 0.2.1
Casual EditKit has been verified with the following configuration.
Emacs 29.4 (macOS 14.5, Ubuntu Linux 22.04.4 LTS)
Asks As Casual EditKit is new, we are looking for early adopters! Your [[https://github.com/kickingvegas/casual-symbol-overlay/discussions][feedback]] is welcome as it will likely impact Casual EditKit's evolution, particularly with regards to UI.
Install Typical installation of Casual EditKit is via MELPA. A reference menu (~casual-editkit-main-tmenu~) illustrating nearly all the different menus offered by Casual EditKit is provided. This menu can be used “as-is” with your binding of preference. For consistency with other Casual Packages, the binding ~C-o~ is used in the example below. Other candidate bindings include ~M-o~ and ~F10~. To facilitate default access to this menu, the configuration below sets this binding to be global which can be overridden per mode. This is /not/ mandatory and users are free to integrate Casual EditKit into their Emacs configuration however they see fit.
(require 'casual-editkit) ;; optional (keymap-global-set "C-o" #'casual-editkit-main-tmenu)
If you use ~use-package~, here is the recipe for installing and configuring it.
(use-package casual-editkit :ensure nil :bind (("C-o" . casual-editkit-main-tmenu)))
For motivated users desiring a bespoke solution, it is recommended that they use Casual EditKit as a library of menus to build their own workflows.
** A Note on Package Dependencies Casual EditKit requires Casual Lib which in turn requires a recent installation of Transient 0.6.0+ from either [[https://elpa.gnu.org/packages/transient.html][ELPA]] or [[https://melpa.org/#/transient][MELPA]]. As an older version of Transient is built-in to the Emacs release, the package manager ~package.el~ will /not/ update this package unless the customizable variable ~package-install-upgrade-built-in~ is set to ~t~. Set this variable and proceed with installing Casual EditKit. Alternately invoking ~package-install~ with a prefix (~C-u~) will temporarily coerce the update of the built-in package. (example: ~C-u M-x package-install~ ~casual-editkit~)
As Transient is closely tied to Magit, installing the latest version of Magit (via [[https://elpa.nongnu.org/nongnu/magit.html][non-GNU ELPA]] or [[https://melpa.org/#/magit][MELPA]]) before installing Casual EditKit can also pick up the latest version of Transient.
Each menu item has a /key/ and a /label/. The /key/ is what is typed by the user to select the menu item. A key can be prefixed with a meta (M-) or control (C-) key.
Transient supports nested menus. Exiting a menu can be done in two ways:
If a mouse is available, a menu item can be selected by moving the mouse cursor over its label and pressing down button 1.
Pressing the ~?~ key or ~C-h~ will toggle help for all the menu items. Press the key of interest to get help for it.
When a Transient menu is raised, a prefix argument (~C-u~) and an optional argument can be entered before selecting a menu item.
** Register commands (~casual-editkit-registers-tmenu~) Register commands for saving and recalling text, point, window configuration, and keyboard macros are supported here.
[[file:docs/images/casual-editkit-registers-screenshot.png]]
** Rectangle commands (~casual-editkit-rectangle-tmenu~) This menu offers all the rectangle commands. It is packaged as a sub-menu of ~casual-editkit-edit-tmenu~.
[[file:docs/images/casual-editkit-rectangle-screenshot.png]]
** Edit commands (~casual-editkit-edit-tmenu~) This menu contains commands and sub-menus related to editing text.
[[file:docs/images/casual-editkit-edit-screenshot.png]]
Depending on the buffer mode, text can be operated on with different granularity as words, sentences, paragraphs, balanced expressions, functions (defuns). The following sub-menus illustrate what operations can be done on the different text granularity.
*** Mark (~casual-editkit-mark-tmenu~) Text can be marked with different granularity with this menu. Note that marking functions (Defun) is only supported for modes derived from ~prog-mode~.
[[file:docs/images/casual-editkit-mark-screenshot.png]]
*** Copy (~casual-editkit-copy-tmenu~) Text can be copied with different granularity with this menu. [[file:docs/images/casual-editkit-copy-screenshot.png]]
*** Kill (Cut) (~casual-editkit-kill-tmenu~) Text can be cut (killed) with different granularity with this menu. [[file:docs/images/casual-editkit-kill-screenshot.png]]
*** Move (~casual-editkit-move-tmenu~) Text can be moved forwards or backwards with different granularity with this menu. Note that selecting a granularity will raise another menu to allow selection of direction (forward, backward) the text is to be moved. To enable repeat operation, that menu is persisted and must be dismissed either with either ~C-q~ (dismiss all) or ~C-g~ (dismiss to previous menu). [[file:docs/images/casual-editkit-move-screenshot.png]]
*** Transpose (~casual-editkit-transpose-tmenu~) Text can be transposed with different granularity with this menu.
[[file:docs/images/casual-editkit-transpose-screenshot.png]]
*** Transform (~casual-editkit-transform-tmenu~) Text can be transformed with different granularity with this menu. Supported transformations are capitalization, lower and upper casing of text.
[[file:docs/images/casual-editkit-transform-screenshot.png]]
*** Delete (~casual-editkit-delete-tmenu~) Operations involving text deletion are included in this menu, including joining lines and zapping to a character.
[[file:docs/images/casual-editkit-delete-screenshot.png]]
*** Sort (~casual-editkit-sort-tmenu~) Sorting operations on different sections of text are supported, as well as support for sorting off a field. Press ~?~ or ~C-h~ to get help for a specific command.
[[file:docs/images/casual-editkit-sort-screenshot.png]]
** Window management (~casual-editkit-window-tmenu~) This menu provides support for different Emacs window management commands. Note that in Emacs, /window/ is defined [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Basic-Windows.html#:~:text=A%20window%20is%20an%20area,view%20several%20buffers%20at%20once.][differently]] than its usage in contemporary graphical user interfaces. [[file:docs/images/casual-editkit-window-screenshot.png]]
If the variable ~casual-lib-use-unicode~ is set to ~t~, then Unicode symbols are used in the labels.
[[file:docs/images/casual-editkit-window-unicode-screenshot.png]]
*** Deletion (~casual-editkit-window-delete-tmenu~) This menu provides support for deleting windows. [[file:docs/images/casual-editkit-window-delete-screenshot.png]]
** Search & Replace commands (~casual-editkit-search-tmenu~) Operations related to search and replace are captured by this menu. Note that this menu uses Transient prefix arguments (~--backward~ and ~--regexp~). This is because some commands have variants involving direction and whether to search using a regexp. Commands that support direction will by default operate forward of the current point if ~--backward~ is not enabled.
[[file:docs/images/casual-editkit-search-screenshot.png]]
* Open commands (~casual-editkit-open-tmenu~) Commands related to opening a file (either for writing or read-only) are supported here. The Project* sub-menu is also offered here.
[[file:docs/images/casual-editkit-open-screenshot.png]]
** Project commands (~casual-editkit-project-tmenu~) Project-related commands are listed in this menu.
[[file:docs/images/casual-editkit-project-screenshot.png]]
** Bookmark commands (~casual-editkit-bookmarks-tmenu~) Commands edit, add, or jump to a bookmark are captured in this menu.
[[file:docs/images/casual-editkit-bookmarks-screenshot.png]]
** Tool commands (~casual-editkit-tools-tmenu~) This menu holds an assorted collection of different tools/utilities provided by Emacs. Motivated users can use this Transient prefix as starting point to create a menu customized to their needs.
[[file:docs/images/casual-editkit-tools-screenshot.png]]
** Macro (~casual-editkit-macro-tmenu~) Commands for managing macros are provided for by this menu. Note that macro creation commands are /not/ supported as they are tightly-bound to keybindings.
[[file:docs/images/casual-editkit-macro-screenshot.png]]
Development For users who wish to help contribute to Casual EditKit or personally customize it for their own usage, please read the [[docs/developer.org][developer documentation]].
Sponsorship If you enjoy using Casual EditKit, consider making a modest financial contribution to help support its development and maintenance.
[[https://www.buymeacoffee.com/kickingvegas][file:docs/images/default-yellow.png]]
Different interfaces include those for I-Search, Dired, Info, Calc, Bookmarks, RE-Builder, IBuffer, and others. Learn more about them today!