{"id":13570985,"url":"https://github.com/edkolev/evil-lion","last_synced_at":"2025-09-21T22:31:17.713Z","repository":{"id":18528543,"uuid":"84434779","full_name":"edkolev/evil-lion","owner":"edkolev","description":"Evil align operator","archived":false,"fork":false,"pushed_at":"2023-05-11T14:02:07.000Z","size":44,"stargazers_count":131,"open_issues_count":4,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-18T20:46:47.550Z","etag":null,"topics":["emacs"],"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/edkolev.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}},"created_at":"2017-03-09T11:31:44.000Z","updated_at":"2024-08-27T08:47:36.000Z","dependencies_parsed_at":"2024-01-14T03:50:25.668Z","dependency_job_id":"ae2b9242-256d-4264-8abb-5f504bfb8aa9","html_url":"https://github.com/edkolev/evil-lion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edkolev/evil-lion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edkolev%2Fevil-lion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edkolev%2Fevil-lion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edkolev%2Fevil-lion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edkolev%2Fevil-lion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edkolev","download_url":"https://codeload.github.com/edkolev/evil-lion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edkolev%2Fevil-lion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276318278,"owners_count":25621648,"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-09-21T02:00:07.055Z","response_time":72,"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"],"created_at":"2024-08-01T14:00:57.233Z","updated_at":"2025-09-21T22:31:17.471Z","avatar_url":"https://github.com/edkolev.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/edkolev/evil-lion.svg?branch=master)](https://travis-ci.org/edkolev/evil-lion)\n[![MELPA](https://melpa.org/packages/evil-lion-badge.svg)](https://melpa.org/#/evil-lion)\n\n![Emacs evil alignment operator](https://cloud.githubusercontent.com/assets/1532071/23845388/6edda00c-07d0-11e7-9ea1-ffa945f03980.png)\n\nevil-lion\n=========\n\nThis package provides `gl` and `gL` align operators: `gl MOTION CHAR` and right-align `gL MOTION CHAR`.\n\nUse CHAR `/` to enter regular expression if a single character wouldn't suffice.\n\nUse CHAR `RET` to align with align.el's default rules for the active major mode.\n\nPort of [vim-lion](https://github.com/tommcdo/vim-lion)\n\n![scar](https://cloud.githubusercontent.com/assets/1532071/23858247/7f33c4c6-0808-11e7-822c-e63c787c2f2b.png)\n\nInstallation\n------------\n\n#### with [use-package](https://github.com/jwiegley/use-package)\n``` emacs-lisp\n(use-package evil-lion\n  :ensure t\n  :config\n  (evil-lion-mode))\n```\n\n#### without [use-package](https://github.com/jwiegley/use-package)\n\n`M-x package-install RET evil-lion RET`, then add in `init.el`:\n\n`(evil-lion-mode)`\n\nUsage\n-----\n\nAlign with `gl MOTION CHAR` or right-align with `gL MOTION CHAR`.\n\nIf the align separator is `/` you will be prompted for a regular expression instead of a plain character.\nIf the align separator is `RET` alignment will be performed with align.el's rules specific for the major mode.\n\nYou can pass count `1` to align on the first occurrence of `CHAR`. To pass count, use: `COUNT gl MOTION CHAR`.\n\n#### Example, left align `gl`:\n\nAfter pressing `glip=` (`gl` is the operator, `ip` text object paragraph, `=` separator)\n```\none = 1\nthree = 3\nfifteen = 15\n```\n\nwill become:\n\n```\none     = 1\nthree   = 3\nfifteen = 15\n```\n\n#### Example, right align with `gL`:\n\nAfter pressing `gLip,`\n```\none, two, three,\nfifteen, sixteen, seventeen\n```\n\nwill become:\n\n```\none,     two,     three,\nfifteen, sixteen, seventeen\n```\n\n#### Example, align with major mode's alignment rules:\n\nIn perl-mode, after pressing `glib RET` (`RET` is return key, not individal keys):\n\n``` perl\nmy %hash = (\n   a =\u003e 1,\n   bbb =\u003e 2,\n   cccc =\u003e 3,\n\n   a =\u003e 1,\n   bbb =\u003e 2,\n   cccccc =\u003e 3\n);\n```\n\nwill become:\n\n``` perl\nmy $hash = (\n   a    =\u003e 1,\n   bbb  =\u003e 2,\n   cccc =\u003e 3,\n\n   a      =\u003e 1,\n   bbb    =\u003e 2,\n   cccccc =\u003e 3\n););\n```\n\n#### Example, align on the first occurrence of CHAR:\n\nAfter pressing `1glip\"`\n```\n(red \"red\"\n(teal-green \"#6fb593\")\n(wheat \"#b9c791\")\n(blue \"blue\")\n(cyan \"#54b6b6\")\n```\n\nwill become:\n\n```\n(red        \"red\"\n(teal-green \"#6fb593\")\n(wheat      \"#b9c791\")\n(blue       \"blue\")\n(cyan       \"#54b6b6\")\n```\n\nCustomization\n-------------\n\n#### Disable squeezing of spaces\n\nBy default, evil-lion will remove unnecessary spaces if there are any. To disable this behaviour:\n\n``` emacs-lisp\n(setq evil-lion-squeeze-spaces nil) ;; default t\n```\n\n#### Change the default keys\n\n``` emacs-lisp\n;; use `g a` (mnemonic `align`)\n;; these variables should be changed before (evil-lion-mode) is called\n(setq evil-lion-left-align-key (kbd \"g a\"))\n(setq evil-lion-right-align-key (kbd \"g A\"))\n(evil-lion-mode)\n```\n\nOr with`use-package` and `bind-key`:\n\n```\n(use-package evil-lion\n  :ensure t\n  :bind (:map evil-normal-state-map\n         (\"g l \" . evil-lion-left)\n         (\"g L \" . evil-lion-right)\n         :map evil-visual-state-map\n         (\"g l \" . evil-lion-left)\n         (\"g L \" . evil-lion-right)))\n```\n\n#### Bind in prog modes only\n\nBind `evil-lion-left` and `evil-lion-right` to your liking.\nThe `evil-lion-mode` is just a convenience mode and should not be enabled with this setup.\n\n``` emacs-lisp\n(evil-define-key 'normal prog-mode-map\n  (kbd \"g l\") 'evil-lion-left\n  (kbd \"g L\") 'evil-lion-right)\n\n(evil-define-key 'visual prog-mode-map\n  (kbd \"g l\") 'evil-lion-left\n  (kbd \"g L\") 'evil-lion-right)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedkolev%2Fevil-lion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedkolev%2Fevil-lion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedkolev%2Fevil-lion/lists"}