{"id":13778488,"url":"https://github.com/sovetnik/vim-hanami","last_synced_at":"2025-09-29T18:28:43.378Z","repository":{"id":78364566,"uuid":"89106337","full_name":"sovetnik/vim-hanami","owner":"sovetnik","description":"Hanami framework vim support","archived":false,"fork":false,"pushed_at":"2019-01-22T16:29:16.000Z","size":83,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-03T18:12:55.670Z","etag":null,"topics":["hanami","vim"],"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/sovetnik.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-04-22T23:57:18.000Z","updated_at":"2022-12-11T03:18:11.000Z","dependencies_parsed_at":"2023-03-12T04:12:20.177Z","dependency_job_id":null,"html_url":"https://github.com/sovetnik/vim-hanami","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/sovetnik%2Fvim-hanami","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sovetnik%2Fvim-hanami/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sovetnik%2Fvim-hanami/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sovetnik%2Fvim-hanami/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sovetnik","download_url":"https://codeload.github.com/sovetnik/vim-hanami/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225048942,"owners_count":17412898,"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":["hanami","vim"],"created_at":"2024-08-03T18:00:54.195Z","updated_at":"2025-09-29T18:28:43.317Z","avatar_url":"https://github.com/sovetnik.png","language":"Vim script","funding_links":[],"categories":["Hanami Gem List"],"sub_categories":["Editors and IDE"],"readme":"# vim-hanami\n\nHanami support plugin for vim that gives you faster navigation between semantically \nassociated files, like Action \u003c-\u003e View, Entity -\u003e Repository or Spec -\u003e Entity.\n\nSpec \u003c-\u003e Entity association works if code lives in `lib` and specs in 'spec' directoties. \n\n## Installation\n\nAdd this to your `.vimrc` or `nvim/init.vim`:\n```\nPlug 'sovetnik/vim-hanami'\n```\n\n## Usage\n\nThe plugin registers `\u003cLeader\u003es`(SpecToggle) and `\u003cLeader\u003ex`(RepoToggle) in normal mode for toggle files.\n\nSome public commands:\n`:HanamiAlterToggle` toggles between entity and repo.\n`:HanamiSpecToggle` toggles between lib and spec.\n`:HanamiProject` returnes project name from `.hanamirc`\n`:HanamiTemplate` returnes template engine from `.hanamirc`\n\n## Toggles\n\nAssume we have generated a hanami entity or action.\n\nSuppose you run `hanami g model fnord` and get files:\n- `lib/bookshelf/entities/fnord.rb`\n- `lib/bookshelf/repositories/fnord_repository.rb`\n- `spec/bookshelf/entities/fnord_spec.rb`\n- `spec/bookshelf/repositories/fnord_repository_spec.rb`\n\u003cimg src=\"./images/quad_lib.jpg\" /\u003e\n\nOr we run `hanami generate action web foobar#show` and get:\n- `spec/web/controllers/foobar/show_spec.rb`\n- `apps/web/controllers/foobar/show.rb`\n- `apps/web/views/foobar/show.rb`\n- `apps/web/templates/foobar/show.html.erb`\n- `spec/web/views/foobar/show_spec.rb`\n\u003cimg src=\"./images/quad_app.jpg\" /\u003e\n\nToggle command simply splits window with alter or spec file.\n\n### AlterToggle\nThis command mapped to `\u003cLeader\u003ex` \nFrom buffer with Action, View or its specs toggles between them, Action \u003c-\u003e View.  \n\u003cimg src=\"./images/av.jpg\" /\u003e\n\u003cimg src=\"./images/va.jpg\" /\u003e\n\nFrom buffer with Entity, Repository or its specs toggles between them, Entity \u003c-\u003e Repo.\n\u003cimg src=\"./images/er.jpg\" /\u003e\n\u003cimg src=\"./images/re.jpg\" /\u003e\n\n### SpecToggle\nThis command mapped to `\u003cLeader\u003es` \nFrom Action, Entity, Repository and View toggles between them and their specs. \n\u003cimg src=\"./images/as.jpg\" /\u003e\n\u003cimg src=\"./images/ls.jpg\" /\u003e\n\u003cimg src=\"./images/sa.jpg\" /\u003e\n\u003cimg src=\"./images/sl.jpg\" /\u003e\n\n## Settings\n\nIn your `~/.vimrc` or `~/.config/nvim/init.vim` add this statement to change open strategy:\n```vim\nlet g:hanami_open_strategy = 'vsplit'\n```\nDefault strategy is `split`.\n\nYou can disable included mappings:\n```vim\nlet g:hanami_map_keys = 0\n```\nBy default mappings enabled.\n\n## Next features(planned)\n\n- navigation in app folder\n- something else\n\n## License\n\nThe Vim Hanami plugin is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsovetnik%2Fvim-hanami","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsovetnik%2Fvim-hanami","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsovetnik%2Fvim-hanami/lists"}