{"id":16406279,"url":"https://github.com/itchyny/miv","last_synced_at":"2025-03-21T03:30:47.052Z","repository":{"id":14873354,"uuid":"17596862","full_name":"itchyny/miv","owner":"itchyny","description":"Vim plugin manager written in Haskell","archived":false,"fork":false,"pushed_at":"2023-03-02T23:35:24.000Z","size":240,"stargazers_count":66,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-12T06:09:07.544Z","etag":null,"topics":["haskell","vim","vim-plugin-manager","vimrc"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/itchyny.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":"2014-03-10T15:06:20.000Z","updated_at":"2024-04-04T13:17:16.000Z","dependencies_parsed_at":"2022-07-16T03:16:13.417Z","dependency_job_id":null,"html_url":"https://github.com/itchyny/miv","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fmiv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fmiv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fmiv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fmiv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itchyny","download_url":"https://codeload.github.com/itchyny/miv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221811375,"owners_count":16884305,"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":["haskell","vim","vim-plugin-manager","vimrc"],"created_at":"2024-10-11T06:09:15.716Z","updated_at":"2024-10-28T09:13:39.392Z","avatar_url":"https://github.com/itchyny.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# miv\n[![CI Status](https://github.com/itchyny/miv/workflows/CI/badge.svg)](https://github.com/itchyny/miv/actions)\n[![Hackage](https://img.shields.io/hackage/v/miv.svg)](https://hackage.haskell.org/package/miv)\n[![Release](https://img.shields.io/github/release/itchyny/miv/all.svg)](https://github.com/itchyny/miv/releases)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/itchyny/miv/blob/main/LICENSE)\n\n### Vim plugin manager written in Haskell\nThe `miv` is a command line tool for managing Vim plugins with a single YAML\nconfiguration file. The motivation of this tool is\n\n- to generate a Vim plugin loader files in Vim script\n  - A plugin manager written in Vim script build script code and evaluates it\n    on editor startup. But the executed commands do not change unless the\n    user's configurations do not change. Instead of building the commands on\n    editor startup, `miv` generates static plugin loader scripts after plugin\n    installation.\n- to provide a declarative way to manage Vim plugins\n  - Various loading triggers, script configurations and loading dependency can\n    be defined.\n- to provide a command line tool which is friendly to interact with other tools\n  - You can easily update the Vim plugins in cron schedule or from shell script.\n\n## Installation\n### Homebrew\n```sh\nbrew install itchyny/tap/miv\n```\n\n### Build with stack\n```sh\ngit clone https://github.com/itchyny/miv.git \u0026\u0026 cd miv \u0026\u0026 stack install\n```\n\n## User guide\n1. Add the miv plugin path to `runtimepath` in your `.vimrc`.\n2. Create miv configuration file at `~/.vimrc.yaml`. (or `~/.vim/.vimrc.yaml`, `$XDG_CONFIG_HOME/miv/config.yaml`)\n3. Execute `miv install`.\n\nExample vimrc:\n```vim\nfiletype off\nif has('vim_starting')\n  set rtp^=~/.vim/miv/miv\n  \" or when you set $XDG_DATA_HOME,\n  \" set rtp^=$XDG_DATA_HOME/miv/miv\nendif\nfiletype plugin indent on\n```\n\nExample miv configuration file (refer to [.vimrc.yaml](https://github.com/itchyny/dotfiles/blob/main/.vimrc.yaml) for how the author configures):\n```yaml\nplugin:\n\n  Align:\n    command: Align\n\n  itchyny/lightline.vim:\n    before: |\n      let g:lightline = {\n            \\   'colorscheme': 'wombat',\n            \\ }\n\n  itchyny/calendar.vim:\n    mapleader: \",\"\n    command: Calendar\n    mapping: \u003cPlug\u003e(calendar)\n    script: |\n      nmap \u003cLeader\u003ez \u003cPlug\u003e(calendar)\n    before: |\n      let g:calendar_views = [ 'year', 'month', 'day_3', 'clock' ]\n\n  prabirshrestha/vim-lsp:\n    before: |\n      let g:lsp_async_completion = 1\n      let g:lsp_text_edit_enabled = 0\n      let g:lsp_signs_enabled = 0\n      augroup lsp_install\n        autocmd!\n        autocmd User lsp_buffer_enabled setlocal omnifunc=lsp#complete\n      augroup END\n\n  prabirshrestha/asyncomplete.vim: {}\n\n  prabirshrestha/asyncomplete-lsp.vim:\n    dependon: asyncomplete\n\n  prabirshrestha/asyncomplete-buffer.vim:\n    dependon: asyncomplete\n    after: |\n      call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({\n          \\ 'name': 'buffer',\n          \\ 'whitelist': ['*'],\n          \\ 'completor': function('asyncomplete#sources#buffer#completor'),\n          \\ 'config': {\n          \\    'max_buffer_size': 100000,\n          \\  },\n          \\ }))\n\n  prabirshrestha/asyncomplete-file.vim:\n    dependon: asyncomplete\n    after: |\n      call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({\n          \\ 'name': 'file',\n          \\ 'whitelist': ['*'],\n          \\ 'completor': function('asyncomplete#sources#file#completor'),\n          \\ }))\n\n  mattn/vim-lsp-settings:\n    dependon: lsp\n\n  mattn/emmet-vim:\n    filetype:\n      - html\n      - css\n    before: |\n      let g:user_emmet_settings = { 'indentation' : '  ' }\n    after: |\n      autocmd FileType html,css imap \u003cbuffer\u003e \u003ctab\u003e \u003cplug\u003e(emmet-expand-abbr)\n\n  elzr/vim-json:\n    filetype: json\n\n  cespare/vim-toml:\n    filetype: toml\n\n  groenewege/vim-less:\n    filetype: less\n\n  tpope/vim-haml:\n    filetype: haml\n\n  jade.vim:\n    filetype: jade\n\n  kana/vim-textobj-user: {}\n\n  kana/vim-textobj-entire:\n    dependon: textobj-user\n    mapmode:\n      - o\n      - v\n    mapping:\n      - \u003cPlug\u003e(textobj-entire-a)\n      - \u003cPlug\u003e(textobj-entire-i)\n      - ie\n      - ae\n\n  kana/vim-textobj-line:\n    dependon: textobj-user\n    mapmode:\n      - o\n      - v\n    mapping:\n      - \u003cPlug\u003e(textobj-line-a)\n      - \u003cPlug\u003e(textobj-line-i)\n      - il\n      - al\n\nbefore: |\n  let g:is_bash = 1\n  let g:loaded_2html_plugin = 1\n  let g:loaded_rrhelper = 1\n\nafter: |\n  let g:mapleader = ','\n\nfiletype:\n  vim: |\n    setlocal foldmethod=marker\n  css: |\n    setlocal iskeyword=37,45,48-57,95,a-z,A-Z,192-255\n  make: |\n    setlocal noexpandtab\n  sh: |\n    setlocal iskeyword=36,45,48-57,64,95,a-z,A-Z,192-255\n```\n\n## `miv` subcommands\nThe `miv` command has the following subcommands.\n\n|command|description|\n|:--|:--|\n|`install`|Installs all the plugins.|\n|`update`|Updates the plugins (outdated plugins are skipped).|\n|`update!`|Updates all the plugins.|\n|`update [plugins]`|Updates the specified plugins.|\n|`clean`|Removes unused directories and files.|\n|`generate`|Generates the miv plugin files. (`miv install` and `miv update` automatically do this task)|\n|`ftdetect`|Gather ftdetect scripts. (`miv install` and `miv update` automatically do this task)|\n|`helptags`|Generates the helptags file. (`miv install` and `miv update` automatically do this task)|\n|`list`|Lists all the plugins.|\n|`edit`|Edits the miv config file.|\n|`command`|Lists the subcommands of `miv`.|\n|`path [plugins]`|Prints the paths of the plugins.|\n|`each [commands]`|Executes the commands each directory of the plugins. For example, you can execute `miv each pwd` or `miv each git gc`.|\n|`help`|Shows the help of `miv`.|\n|`version`|Shows the version of `miv`.|\n\nCommands to execute when you want to\n\n|do what|command|\n|:--|:--|\n|install a new plugin|`miv edit`, update the configuration file, save, exit the editor and `miv install`|\n|update the installed plugins but skip outdated plugins|`miv update`|\n|update all the installed plugins|`miv update!`|\n|update specific plugins|`miv update [plugin1] [plugin2]..`|\n|uninstall a plugin|`miv edit`, remove the related configurations, `miv generate` (and `miv clean` if you want)|\n|list all the plugins|`miv list`|\n|count the number of plugins|\u003ccode\u003emiv list \u0026vert; wc -l\u003c/code\u003e|\n|change the current working directory to a plugin directory|`cd \"$(miv path [plugin])\"`|\n|want a help|`miv help`|\n\n## Plugin configuration\n### Loading triggers for the plugin\n|key|type|description|\n|:--|:--|:--|\n|`filetype`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|load the plugin on setting the filetype|\n|`command`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|load the plugin on invoking the command|\n|`function`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|load the plugin on calling a function matching the value in regex|\n|`mapping`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|load the plugin on the mapping|\n|`mapmode`|\u003ccode\u003e'n' \u0026vert; 'v' \u0026vert; 'x' \u0026vert; 's' \u0026vert; 'i' \u0026vert; 'c' \u0026vert; 'l' \u0026vert; 'o' \u0026vert; 't'\u003c/code\u003e|specify the `map-modes` for the `mapping` configuration|\n|`cmdline`|\u003ccode\u003e':' \u0026vert; '/' \u0026vert; '?' \u0026vert; '@'\u003c/code\u003e|the command-line character to load the plugin|\n|`insert`|`boolean`|load the plugin on entering the insert mode for the first time|\n\n### Configurations for the plugin\n|key|type|description|\n|:--|:--|:--|\n|`script`|`string`|script run on startup, specify some configurations or mappings to load the plugin|\n|`after`|`string`|script run after the plugin is loaded|\n|`before`|`string`|script run just before the plugin is loaded|\n|`mapleader`|`string`|the `mapleader` (`\u003cLeader\u003e`) for the `script`|\n\n### Dependency configurations\n|key|type|description|\n|:--|:--|:--|\n|`dependon`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|plugins on which the plugin depends; they are loaded just before the plugin is loaded|\n|`dependedby`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|(deprecated in favor of `loadafter`) plugins loaded just after the plugin is loaded|\n|`loadbefore`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|indicates lazy loading, the plugin is loaded just before any of the configured plugins|\n|`loadafter`|\u003ccode\u003estring \u0026vert; string[]\u003c/code\u003e|indicates lazy loading, the plugin is loaded just after any of the configured plugins|\n\n### Other miscellaneous configurations\n|key|type|description|\n|:--|:--|:--|\n|`enable`|`string`|enable the plugin when the expression (in Vim script) is truthy|\n|`submodule`|`boolean`|pull the submodules of the repository|\n|`build`|`string`|build shell script to execute after installing and updating|\n|`sync`|`boolean`|skip pulling the repository if the value is `false`|\n\n## Author\nitchyny (https://github.com/itchyny)\n\n## License\nThis software is released under the MIT License, see LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitchyny%2Fmiv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitchyny%2Fmiv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitchyny%2Fmiv/lists"}