{"id":13837049,"url":"https://github.com/countvajhula/rigpa","last_synced_at":"2025-08-20T08:31:49.969Z","repository":{"id":39606475,"uuid":"197649531","full_name":"countvajhula/rigpa","owner":"countvajhula","description":"A metacircular modal UI framework.","archived":false,"fork":false,"pushed_at":"2025-07-02T02:04:32.000Z","size":531,"stargazers_count":163,"open_issues_count":10,"forks_count":4,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-07-02T03:19:53.933Z","etag":null,"topics":["emacs","modal-interfaces","vim"],"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/countvajhula.png","metadata":{"files":{"readme":"README.rst","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,"zenodo":null}},"created_at":"2019-07-18T20:03:29.000Z","updated_at":"2025-05-25T12:28:29.000Z","dependencies_parsed_at":"2024-02-21T16:43:01.446Z","dependency_job_id":"cc8ce837-d11d-486e-bc09-7902696cf354","html_url":"https://github.com/countvajhula/rigpa","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/countvajhula/rigpa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countvajhula%2Frigpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countvajhula%2Frigpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countvajhula%2Frigpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countvajhula%2Frigpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/countvajhula","download_url":"https://codeload.github.com/countvajhula/rigpa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countvajhula%2Frigpa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271287619,"owners_count":24733424,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","modal-interfaces","vim"],"created_at":"2024-08-04T15:00:59.920Z","updated_at":"2025-08-20T08:31:49.963Z","avatar_url":"https://github.com/countvajhula.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"rigpa\n=====\n\nA modal UI framework for Emacs.\n\nRigpa allows you to construct structures relating editing modes (these\ncould be evil modes or hydras, or anything implementing a common modal\ninterface (\"chimera\")) and manipulate which structures are active at\nany point in time.  It generalizes both vim's notion of editing mode,\nas well as Emacs's notion of a major mode into a unified way of\nlooking at things, that is, as towers of modes which can be swapped\nand themselves edited using the very modes they contain.\n\nIn addition, rigpa also defines conventions that modes should follow\nin order to be seamlessly integrated into editing structures.  This\nincludes conventions around keybindings for moving up and down the\nhierarchy of editing levels, standard semantics of modifier keys,\ndefining a canonical action for each mode, and other such conventions\nto ensure semantic uniformity across editing levels.\n\nWatch the demo from EmacsConf 2020:\n\n.. raw:: html\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.youtube.com/watch?v=jBUurG3f_aM\"\u003e\n      \u003cimg width=70% src=\"https://i.imgur.com/EV3q6G7.png\" alt=\"Watch video\" title=\"Watch video\"/\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\nInstallation\n============\n\nThis package isn't on `MELPA \u003chttps://melpa.org/\u003e`_ yet, but you can install a pre-release version using `straight.el \u003chttps://github.com/raxod502/straight.el\u003e`_ by putting this somewhere in your :code:`.emacs.d`:\n\n.. code-block:: elisp\n\n  (use-package rigpa\n\n    :after (evil symex buffer-ring)\n\n    :straight\n    (rigpa\n      :type git\n      :host github\n      :repo \"countvajhula/rigpa\")\n\n    :config\n    (rigpa-initialize)\n    (setq rigpa-mode t)\n\n    ;; temporary workaround for https://github.com/countvajhula/rigpa/issues/9\n    (remove-hook 'evil-symex-state-exit-hook #'symex-disable-editing-minor-mode)\n\n    ;; custom config\n    (setq rigpa-show-menus nil)\n\n    ;; navigating meta modes\n    (global-unset-key (kbd \"s-m\"))\n    (global-set-key (kbd \"s-m s-m\") 'rigpa-flashback-to-last-tower)\n    (global-set-key (kbd \"C-\u003cescape\u003e\")\n                    (lambda ()\n                      (interactive)\n                      (when (eq rigpa--complex rigpa-meta-complex)\n                        (rigpa-exit-mode-mode))\n                      (rigpa-enter-tower-mode)))\n    (global-set-key (kbd \"M-\u003cescape\u003e\") 'rigpa-enter-mode-mode)\n    (global-set-key (kbd \"s-\u003cescape\u003e\") 'rigpa-enter-mode-mode)\n    (global-set-key (kbd \"M-\u003creturn\u003e\")\n                    (lambda ()\n                      (interactive)\n                      (when (eq rigpa--complex rigpa-meta-complex)\n                        (rigpa-enter-selected-level)\n                        (let ((ground (rigpa--get-ground-buffer)))\n                          (rigpa-exit-mode-mode)\n                          (switch-to-buffer ground)))))\n    (global-set-key (kbd \"s-\u003creturn\u003e\")\n                    (lambda ()\n                      (interactive)\n                      (when (eq rigpa--complex rigpa-meta-complex)\n                        (rigpa-enter-selected-level)\n                        (let ((ground (rigpa--get-ground-buffer)))\n                          (rigpa-exit-mode-mode)\n                          (switch-to-buffer ground)))))\n    (global-set-key (kbd \"C-\u003creturn\u003e\")\n                    (lambda ()\n                      (interactive)\n                      (when (eq rigpa--complex rigpa-meta-tower-complex)\n                        (rigpa-exit-tower-mode)\n                        (rigpa-enter-mode-mode))))\n\n    ;; indexed entry to various modes\n    (global-set-key (kbd \"s-n\") 'evil-normal-state)\n    (global-set-key (kbd \"s-y\")        ; symex mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"symex\")))\n    (global-set-key (kbd \"s-;\") (kbd \"s-y\"))\n    (global-set-key (kbd \"s-w\")        ; window mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"window\")))\n    (global-set-key (kbd \"s-v\")        ; view mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"view\")))\n    (global-set-key (kbd \"s-x\")        ; char mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"char\")))\n    (global-set-key (kbd \"s-a\")        ; activity mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"activity\")))\n    (global-set-key (kbd \"s-z\")        ; text mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"text\")))\n    (global-set-key (kbd \"s-g\")        ; history mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"history\")))\n    (global-set-key (kbd \"s-i\")        ; system mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"system\")))\n    (global-set-key (kbd \"s-b\")        ; buffer mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"buffer\")))\n    (global-set-key (kbd \"s-f\")        ; file mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"file\")))\n    (global-set-key (kbd \"s-t\")        ; tab mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"tab\")))\n    (global-set-key (kbd \"s-l\")        ; line mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"line\")))\n    (global-set-key (kbd \"s-e\")        ; application mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"application\")))\n    (global-set-key (kbd \"s-r\")        ; word mode\n                    (lambda ()\n                      (interactive)\n                      (rigpa-enter-mode \"word\"))))\n\nUsage\n=====\n\"Direct entry\" into modes is (by default) done via the \"super\" key prefix, e.g. ``s-v`` goes into View Mode. ``Esc`` and ``Enter`` will always return you to a tower-native state and also navigate that tower. If you leave a buffer or window while in some state, by momentarily entering buffer or window mode, you will be placed back in your original state when you return. In-buffer states like Symex, Word, Character mode are backed by Evil, and do not show menus. Global states like View, Window, Buffer, are hydra-backed and can show/dismiss menus on demand (default binding ``H-m``).\n\nThe most useful towers at the moment are Vim tower, Lisp tower (containing Symex mode), and Emacs tower. If you are working with Lisp code, then alternating (e.g. via ``s-m s-m``) between Vim and Lisp towers, or between Emacs and Lisp towers, is a common usage pattern. Whatever towers you define, you will probably want to leverage direct entry into View, Window, Buffer modes as part of normal usage, especially for their canonical actions. E.g. ``s-b s-b`` to alternate to most recent buffer, ``s-w s-w`` to alternate to most recent window, ``s-v \u003ctab\u003e`` to set to preferred zoom, ``s-w w`` to maximize window, besides using the usual navigation commands in these modes to get around.\n\nSee the `Keybinding Model \u003chttps://github.com/countvajhula/rigpa/blob/master/Keybinding_Model.rst\u003e`_ for keys that work in every mode, including navigations for getting around, and transformations for moving things around, or deleting, transforming them in some way.\n\nTips\n====\n\nMode Line Feedback\n------------------\n\nRigpa comes with many modes -- View mode, Window mode, Buffer mode, Line mode, and more. To keep track of which mode you're in at any time, it's useful to have visual feedback in the form of a color-coded mode indicator in your mode line, with colors that are different enough to give you a clue at a glance whether you're in the right mode. Rigpa currently defines and maintains Evil states corresponding to every Rigpa mode in order to benefit from existing Emacs tools that have already been written to track your Evil state. So you can use any of these existing plugins for this purpose, including powerline and `telephone-line \u003chttps://github.com/dbordak/telephone-line\u003e`_. For example, you could use `this config for telephone-line \u003chttps://github.com/countvajhula/.emacs.d/blob/95b43a92cabf7719875f1f937b4c3de093d32a24/my-init/application-environment.el#L437-L522\u003e`__ to ensure the different modes have distinct and useful colors.\n\n\"License\"\n==========\nThis work is \"part of the world.\" You are free to do whatever you like with it and it isn't owned by anybody, not even the creators. Attribution would be appreciated and would help, but it is not strictly necessary nor required. If you'd like to learn more about this way of doing things and how it could lead to a peaceful, efficient, and creative world, and how you can help, visit `drym.org \u003chttps://drym.org\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcountvajhula%2Frigpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcountvajhula%2Frigpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcountvajhula%2Frigpa/lists"}