{"id":13896594,"url":"https://github.com/lutobler/vis-modelines","last_synced_at":"2025-07-17T13:30:29.368Z","repository":{"id":88793418,"uuid":"103161123","full_name":"lutobler/vis-modelines","owner":"lutobler","description":"Vis plugin that tries to read standard Vim modelines with an LPEG parser","archived":false,"fork":false,"pushed_at":"2020-12-28T12:56:52.000Z","size":15,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-07T18:40:04.413Z","etag":null,"topics":["plugin","text-editor","vis"],"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/lutobler.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-09-11T16:37:01.000Z","updated_at":"2024-01-12T12:05:44.000Z","dependencies_parsed_at":"2023-06-12T15:15:06.432Z","dependency_job_id":null,"html_url":"https://github.com/lutobler/vis-modelines","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/lutobler%2Fvis-modelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutobler%2Fvis-modelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutobler%2Fvis-modelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutobler%2Fvis-modelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lutobler","download_url":"https://codeload.github.com/lutobler/vis-modelines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226265521,"owners_count":17597222,"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":["plugin","text-editor","vis"],"created_at":"2024-08-06T18:03:01.306Z","updated_at":"2024-11-25T02:30:57.882Z","avatar_url":"https://github.com/lutobler.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"## vis-modelines\n\nVim's modelines are very useful for setting per-file settings in Vim.\nFor example, the filetype can't always be reliably inferred from the filename, i.e. for templates with generic file extensions or script files that omit the file extension altogether.\n\nThis Vis plugin tries to read standard Vim modelines and set the following (Vis) settings:\n\n`autoindent`, `expandtab`, `numbers`, `tabwidth`, `syntax`.\n\nVim (by default) looks for modelines in the first 5 and last 5 lines of the file. This will emulate this behaviour, but omit the setting to change this threshold, as no sane person would change it (it would break everybody else's Vim).\n\nThis parser assumes you will only use *one* modeline per file, to avoid having to resolve conflicts. It will use the first modeline it finds from the top.\n\n### Installation\n\nClone the repo to your vis plugins directory (`~/.config/vis/plugins`) and add\nthis to your `visrc.lua`:\n```\nrequire(\"plugins/vis-modelines\")\n```\nThe settings from the modeline will be applied *after* Vis is initialized, with the `vis.events.START` event callback.\n\n### Notes\n\nThe unit tests require the [busted](https://github.com/Olivine-Labs/busted) Lua unit testing framework.\n\n### TODO\n\n- [x] Write unit tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flutobler%2Fvis-modelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flutobler%2Fvis-modelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flutobler%2Fvis-modelines/lists"}