{"id":13961866,"url":"https://github.com/nonylene/vim-keymaps","last_synced_at":"2025-12-30T16:54:35.520Z","repository":{"id":55606515,"uuid":"85422089","full_name":"nonylene/vim-keymaps","owner":"nonylene","description":"keymap switcher for vim","archived":false,"fork":false,"pushed_at":"2020-10-29T19:41:26.000Z","size":88,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-28T07:34:41.400Z","etag":null,"topics":["vim"],"latest_commit_sha":null,"homepage":"","language":"Vim script","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/nonylene.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":"2017-03-18T18:10:48.000Z","updated_at":"2022-08-09T23:55:55.000Z","dependencies_parsed_at":"2022-08-15T04:10:52.772Z","dependency_job_id":null,"html_url":"https://github.com/nonylene/vim-keymaps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nonylene/vim-keymaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonylene%2Fvim-keymaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonylene%2Fvim-keymaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonylene%2Fvim-keymaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonylene%2Fvim-keymaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonylene","download_url":"https://codeload.github.com/nonylene/vim-keymaps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonylene%2Fvim-keymaps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266253600,"owners_count":23900052,"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":["vim"],"created_at":"2024-08-08T17:01:32.873Z","updated_at":"2025-12-30T16:54:35.475Z","avatar_url":"https://github.com/nonylene.png","language":"Vim script","funding_links":[],"categories":["Vim script"],"sub_categories":[],"readme":"# vim-keymaps\n\nKeymap switcher for Vim\n\n![ScreenCast](/doc/screencast.gif)\n\n_( Using [lightline](https://github.com/itchyny/lightline.vim) for statusline. )_\n\n## Install\n\n- VimPlug\n\n```vim\nPlug 'nonylene/vim-keymaps'\n```\n\n## Configuration\n\nFirst, map keys to this plugin as you like.\n\n```vim\n\" map any key to \u003cPlug\u003eKeyMapRotate\n\nmap \u003cC-k\u003e \u003cPlug\u003eKeyMapRotate\nimap \u003cC-k\u003e \u003cPlug\u003eKeyMapRotate\n\n\" Call function in order to switch to explicit keymap\n\n\" noremap \u003csilent\u003e \u003cscript\u003e \u003cC-p\u003e :call keymaps#set_keymap(\"US\")\u003cCR\u003e\n\" noremap! \u003cexpr\u003e \u003cC-p\u003e keymaps#set_keymap(\"US\")\n\n\" If you will use paste mode, this is recommended\n\n\" set pastetoggle=\u003cC-k\u003e\n```\n\nKeymaps are configured as array of dictionaries.\n\n```vim\nlet g:keymaps =  [\n      \\  {\n      \\    'name': 'first',\n      \\    'keymap': {\n      \\      'noremap': {\n      \\        '1': '!',\n      \\        '!': '1',\n      \\      },\n      \\      'inoremap': {\n      \\        \"'\": '\"',\n      \\        '¥': '\\',\n      \\      },\n      \\    },\n      \\  },\n      \\  {\n      \\    'name': 'second',\n      \\    'keymap': {\n      \\      'cnoremap': {\n      \\        '1': '@',\n      \\        ':': ';',\n      \\        ';': ':',\n      \\      },\n      \\      'inoremap \u003cunique\u003e': {\n      \\        '¥': '\\|',\n      \\      },\n      \\    },\n      \\  },\n      \\  {\n      \\    'name': 'paste_mode',\n      \\    'paste': 1\n      \\  },\n      \\]\n```\n\nYou can use `\u003cPlug\u003e`, `\u003cSID\u003e`, etc .\n\n- IMPORTANT:\n\n`\u003cSID\u003e` refers this plugin's scope because mappings are executed with plugin's scope. For that, functions used for `\u003cexpr\u003e` mappings must be global.\n\n```vim\nlet g:keymaps =  [\n      \\  {\n      \\    'name': 'first',\n      \\    'keymap': {\n      \\      'imap': {\n      \\        '2': '\u003cPlug\u003edelimitMate\"',\n      \\        '7': \"\u003cPlug\u003edelimitMate'\",\n      \\      },\n      \\    },\n      \\  },\n      \\  {\n      \\    'name': 'second',\n      \\    'keymap': {\n      \\      'inoremap': {\n      \\        '\u003cSID\u003eparenthese': '()\u003cEsc\u003ei',\n      \\      },\n      \\      'noremap! \u003cscript\u003e': {\n      \\        '8': '\u003cSID\u003eparenthese',\n      \\      },\n      \\      'imap \u003cexpr\u003e': {\n      \\        '1': 'Foo()',\n      \\      },\n      \\    },\n      \\  },\n      \\]\n```\n\n## Other options\n\n- `g:keymaps_unmap_keys` (default: 1)\n\nUnmap prev keymaps before do mapping.\n\n- `g:keymaps_paste_auto_rotate` (default: 1 (if `'paste': 1` exists) / 0)\n\nRotate keymap after exit paste mode (using hook OptionChange). \n\n\"7.4.786\" patch is required to enable this feature.\n\n- `g:keymaps_default`\n\nFirst used keymap name. If not set, first keymap in array will be used.\n\n## Commands\n\n- `KeyMapRotate`\n\nSwitch to next keymap.\n\n- `KeyMapSet \u003ckeymap_name\u003e`\n\nSwitch to explicit keymap.\n\n## Tips\n\n- Get current keymap name\n\n`:call keymaps#get_current_keymap_name`\n\n## License\n\nMIT License (see [LICENSE](./LICENSE)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonylene%2Fvim-keymaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonylene%2Fvim-keymaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonylene%2Fvim-keymaps/lists"}