{"id":13661775,"url":"https://github.com/tommcdo/vim-lion","last_synced_at":"2025-04-25T03:31:17.661Z","repository":{"id":7473856,"uuid":"8821889","full_name":"tommcdo/vim-lion","owner":"tommcdo","description":"A simple alignment operator for Vim text editor","archived":false,"fork":false,"pushed_at":"2022-06-09T08:33:15.000Z","size":34,"stargazers_count":494,"open_issues_count":4,"forks_count":15,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-02T05:13:22.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vim script","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/tommcdo.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}},"created_at":"2013-03-16T16:47:24.000Z","updated_at":"2024-07-31T03:49:37.000Z","dependencies_parsed_at":"2022-08-06T20:01:15.388Z","dependency_job_id":null,"html_url":"https://github.com/tommcdo/vim-lion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommcdo%2Fvim-lion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommcdo%2Fvim-lion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommcdo%2Fvim-lion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommcdo%2Fvim-lion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tommcdo","download_url":"https://codeload.github.com/tommcdo/vim-lion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223979789,"owners_count":17235465,"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":[],"created_at":"2024-08-02T05:01:41.374Z","updated_at":"2024-11-10T16:31:59.724Z","avatar_url":"https://github.com/tommcdo.png","language":"Vim script","funding_links":[],"categories":["Vim script","Vim Script"],"sub_categories":[],"readme":"lion.vim\n========\n\nLion.vim is a tool for aligning text by some character. It defines some\nVim operators that can be used with motion commands to align a targeted\nblock of text.\n\nThe two operators are `gl` and `gL`. `gl` will add spaces to the left of\nthe alignment character, and `gL` will add spaces to the right. Both\noperators accept a count, a motion, and a single character. Without a\ncount, all occurrences of the character will be aligned.\n\nFor example, `glip=` will turn\n\n```php\n$i = 5;\n$username = 'tommcdo';\n$stuff = array(1, 2, 3);\n```\n\ninto\n\n```php\n$i        = 5;\n$username = 'tommcdo';\n$stuff    = array(1, 2, 3);\n```\n\nTyping `3gLi(,` with the cursor somewhere inside `(` and `)` will turn\n\n```php\n$names = array(\n    'bill', 'samantha', 'ray', 'ronald',\n    'mo', 'harry', 'susan', 'ted',\n    'timothy', 'bob', 'wolverine', 'cat',\n    'lion', 'alfred', 'batman', 'linus',\n);\n```\n\ninto\n\n```php\n$names = array(\n    'bill',    'samantha', 'ray',       'ronald',\n    'mo',      'harry',    'susan',     'ted',\n    'timothy', 'bob',      'wolverine', 'cat',\n    'lion',    'alfred',   'batman',    'linus',\n);\n```\n\nIt is also possible to align text by a pattern. To enter a pattern, use `/` as\nthe alignment character (e.g. `glip/`) and then you will be prompted to input\nthe pattern. To align by `/`, simply leave the pattern empty (by pressing\n`Enter`).\n\nInstallation\n------------\n\nIf you don't have a preferred installation method, I recommend\ninstalling [pathogen.vim](https://github.com/tpope/vim-pathogen), and\nthen simply copy and paste:\n\n```sh\ncd ~/.vim/bundle\ngit clone git://github.com/tommcdo/vim-lion.git\n```\n\nOnce help tags have been generated, you can view the manual with\n`:help lion`.\n\nOptions\n-------\n\nOption |                Description |                      Default\n--- | --- | ---\n`g:lion_create_maps`    | Whether to create mappings       | `1`\n`b:lion_squeeze_spaces`\u003cbr\u003e`g:lion_squeeze_spaces` | Squeeze extra spaces             | `0`\n`g:lion_map_right`      | Mapping for right-align operator | `gl`\n`g:lion_map_left`       | Mapping for left-align operator  | `gL`\n\nIf you set: `let b:lion_squeeze_spaces = 1`, and hit `glip=`, you will turn\n\n```php\n$i      = 5;\n$user     = 'tommcdo';\n$stuff  = array(1, 2, 3);\n```\ninto:\n```php\n$i     = 5;\n$user  = 'tommcdo';\n$stuff = array(1, 2, 3);\n```\ninstead of (`b:lion_squeeze_spaces = 0`):\n```php\n$i        = 5;\n$user     = 'tommcdo';\n$stuff    = array(1, 2, 3);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommcdo%2Fvim-lion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommcdo%2Fvim-lion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommcdo%2Fvim-lion/lists"}