{"id":13862699,"url":"https://github.com/mrkkrp/char-menu","last_synced_at":"2025-03-16T23:31:39.040Z","repository":{"id":66241003,"uuid":"50230799","full_name":"mrkkrp/char-menu","owner":"mrkkrp","description":"Create a menu for fast insertion of arbitrary symbols","archived":false,"fork":false,"pushed_at":"2025-03-12T12:31:28.000Z","size":32,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-12T13:30:09.387Z","etag":null,"topics":["emacs","menu","paired-characters","unicode-characters"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrkkrp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-23T08:42:15.000Z","updated_at":"2025-03-12T12:31:24.000Z","dependencies_parsed_at":"2024-03-11T23:32:43.228Z","dependency_job_id":"3d3dc6b3-bd50-42dc-aba5-ce18d5280ddc","html_url":"https://github.com/mrkkrp/char-menu","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Fchar-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Fchar-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Fchar-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Fchar-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrkkrp","download_url":"https://codeload.github.com/mrkkrp/char-menu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835952,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","menu","paired-characters","unicode-characters"],"created_at":"2024-08-05T06:01:50.296Z","updated_at":"2025-03-16T23:31:39.028Z","avatar_url":"https://github.com/mrkkrp.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# Char Menu\n\n[![License GPL 3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt)\n[![MELPA](https://melpa.org/packages/char-menu-badge.svg)](https://melpa.org/#/char-menu)\n[![CI](https://github.com/mrkkrp/char-menu/actions/workflows/ci.yaml/badge.svg)](https://github.com/mrkkrp/char-menu/actions/workflows/ci.yaml)\n\n* [Various methods to insert a Unicode symbol in Emacs](#various-methods-to-insert-a-unicode-symbol-in-emacs)\n* [Installation](#installation)\n* [Usage](#usage)\n* [Example of configuration](#example-of-configuration)\n* [Visual appearance of the menu](#visual-appearance-of-the-menu)\n* [License](#license)\n\nThis package allows the user to create a menu for fast insertion of\narbitrary symbols.\n\nFeatures:\n\n* The symbols can be organized in hierarchies.\n\n* Most frequently used symbols require only one keystroke, while others are\n  placed in dedicated sub-menus (for example, “arrows”) and can be inserted\n  with two or three keystrokes.\n\n* Paired characters like `“”` can be inserted. Normally, the point will be\n  placed between the characters, but if some text is selected, the paired\n  character will wrap it without moving the point.\n\n## Various methods to insert a Unicode symbol in Emacs\n\nLet's skip copying characters from a file or web-page—it is too inefficient.\n\nOne method to insert arbitrary characters is to use `key-translation-map`,\nlike this:\n\n```emacs-lisp\n(define-key key-translation-map (kbd \"\u003cmenu\u003e p\") (kbd \"φ\"))\n```\n\nThe main problem here is that if you have many such translations, they are\nhard to remember. This approach is also not very good for organizing symbols\ninto categories.\n\nAnother approach is to use `abbrev-mode`. I don't like that mode because one\nneeds to keep it enabled and chances are even if you normally don't need the\nword “alpha”, it does not mean that you always want to replace it with the\nsymbol “α”.\n\nInserting a character by its name is done with the `insert-char` command,\nbut it cannot be used heavily because even with auto-completion it takes too\nlong to type the full name of a character. Also, I usually don't want to\npick from all available characters, but rather from a subset of them.\n\n## Installation\n\nThe package is available via MELPA, so you can just type `M-x\npackage-install RET char-menu RET`.\n\nIf you would like to install the package manually, download or clone it and\nput on Emacs' `load-path`. Then you can require it in your init file like\nthis:\n\n```emacs-lisp\n(require 'char-menu)\n```\n\n## Usage\n\nNormally, there are only two things that you need to do:\n\n1. Set the variable `char-menu`.\n2. Bind the command `char-menu`.\n\nThe variable `char-menu` can be customized via the “customize” interface\n(`M-x customize-group char-menu RET`) or set with `setq`. That variable\nshould be bound to a list where every element is either a string to insert\nor a sub-menu, which is represented as a list where the first element is the\nheader of the sub-menu and the rest is its items.\n\nPlace the most frequently needed characters at the beginning of the list.\nOther characters can be organized in categories: “Arrows”, “Greek letters”,\n“Math symbols”, whatever. It's best to keep the number of the menu items\nless then 10, because then you will be able to choose a character using a\nsingle key press on the home row. You don't need to think about key\nbindings—the package assigns them for you.\n\nUsually you want to insert a single character, but there is a need for\npaired punctuation like “this” or «this». Just put these characters together\nand they will be inserted with point (cursor) between them. Wrapping of\nselected text is also supported.\n\nAs for binding of the `char-menu` command, it should be as easy as:\n\n```emacs-lisp\n(global-set-key (kbd \"\u003cmenu\u003e SPC\") #'char-menu)\n```\n\nOf course you can choose a different key combination.\n\n## Example of configuration\n\nThe default configuration is quite basic:\n\n```emacs-lisp\n(\"—\" \"‘’\" \"“”\" \"…\")\n```\n\nAs an example of something more sophisticated, try this:\n\n```emacs-lisp\n(\"—\" \"‘’\" \"“”\" \"…\" \"«»\" \"–\"\n (\"Typography\" \"•\" \"©\" \"†\" \"‡\" \"°\" \"·\" \"§\" \"№\" \"★\")\n (\"Math\"       \"≈\" \"≡\" \"≠\" \"∞\" \"×\" \"±\" \"∓\" \"÷\" \"√\")\n (\"Arrows\"     \"←\" \"→\" \"↑\" \"↓\" \"⇐\" \"⇒\" \"⇑\" \"⇓\")\n (\"Greek\"      \"α\" \"β\" \"Y\" \"δ\" \"ε\" \"ζ\" \"η\" \"θ\" \"ι\" \"κ\" \"λ\" \"μ\"\n               \"ν\" \"ξ\" \"ο\" \"π\" \"ρ\" \"σ\" \"τ\" \"υ\" \"φ\" \"χ\" \"ψ\" \"ω\"))\n```\n\nExcept for Greek letters that are a bit too numerous, all characters here\ncan be accessed in one or two key strokes.\n\n## Visual appearance of the menu\n\nJust like [`ace-popup-menu`](https://github.com/mrkkrp/ace-popup-menu), the\npackage is built on top of [`avy-menu`](https://github.com/mrkkrp/avy-menu),\nwhich implements a handy Avy-powered popup menu. To control appearance of\nthe menu, invoke `M-x customize-group avy-menu RET`.\n\n## License\n\nCopyright © 2016–present Mark Karpov\n\nDistributed under GNU GPL, version 3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkkrp%2Fchar-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrkkrp%2Fchar-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkkrp%2Fchar-menu/lists"}