{"id":13412881,"url":"https://github.com/AllenDang/nvim-expand-expr","last_synced_at":"2025-03-14T18:32:31.041Z","repository":{"id":63938734,"uuid":"395554335","full_name":"AllenDang/nvim-expand-expr","owner":"AllenDang","description":"Expand and repeat expression to multiple lines for neovim.","archived":false,"fork":false,"pushed_at":"2021-08-14T10:21:19.000Z","size":82,"stargazers_count":35,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-31T20:51:37.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllenDang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-13T07:15:14.000Z","updated_at":"2024-07-01T06:09:44.000Z","dependencies_parsed_at":"2023-01-14T15:30:19.187Z","dependency_job_id":null,"html_url":"https://github.com/AllenDang/nvim-expand-expr","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/AllenDang%2Fnvim-expand-expr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenDang%2Fnvim-expand-expr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenDang%2Fnvim-expand-expr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenDang%2Fnvim-expand-expr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllenDang","download_url":"https://codeload.github.com/AllenDang/nvim-expand-expr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243625189,"owners_count":20321252,"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-07-30T20:01:30.545Z","updated_at":"2025-03-14T18:32:30.704Z","avatar_url":"https://github.com/AllenDang.png","language":"Lua","funding_links":[],"categories":["Editing Support","Lua","Editing support"],"sub_categories":["Scrollbar","Misc"],"readme":"# nvim-expand-expr\n\nExpand and repeat expression to multiple lines for neovim.\n\n![demo.gif!](https://github.com/AllenDang/nvim-expand-expr/blob/main/demo.gif)\n\n# Requirements\n\n`Neovim \u003e= 0.5`\n\n# Installation\n\n[packer.nvim](https://github.com/wbthomason/packer.nvim)\n\n`use 'AllenDang/nvim-expand-expr'`\n\n# Usage\n\n```lua\nrequire(\"expand_expr\").expand()\n```\n\nIt will parse cursor line and expand it base on below syntax.\n\n`range|expr`\n\n## range\n\n`range` has two forms.\n\n1. Single number\n   `10|print({%d})` will expand to\n\n```\nprint(1)\nprint(2)\nprint(3)\nprint(4)\nprint(5)\nprint(6)\nprint(7)\nprint(8)\nprint(9)\nprint(10)\n```\n\n2. Range format\n   `3,7|print({%d})` will expand to\n\n```\nprint(3)\nprint(4)\nprint(5)\nprint(6)\nprint(7)\n```\n\n## expr\n\n_expr_ is a string contains multiple `{%d}` parts, the content inside {} will be eval as lua expression.\n\n`3|{%d} + {%d+1} + {%d+2}` will expand to\n\n```\n1 + 2 + 3\n2 + 3 + 4\n3 + 4 + 5\n```\n\n`3|{%d .. ' hello world ' .. %d*3}` will expand to\n\n```\n1 hello world 3\n2 hello world 6\n3 hello world 9\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAllenDang%2Fnvim-expand-expr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAllenDang%2Fnvim-expand-expr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAllenDang%2Fnvim-expand-expr/lists"}