An Alfred workflow to search Vim command cheat sheet + type commands
This is an Alfred workflow that searches a Vim command cheat sheet and sends vim commands directly to the front-most application running Vim, Neovim, etc.
It uses the data from the awesome multi-lingual Vim cheat sheet project https://github.com/rtorr/vim-cheat-sheet.
- Alfred (4 or 5)
- Alfred Powerpack
- Download vim-command.alfredworkflow.
- Double-click the workflow file
- Set up a hotkey trigger (
^⇧⌘v
for instance)
Type vimc
in Alfred or use the hotkey if you have set up one. You can narrow down commands returned by typing-in one or more search keys.
- Type
vimc
into Alfred or use a hotkey if set - Enter one or more search keys to narrow down the commands returned
- Select a command and the Vim command will automatically be typed into the front-most app
Type vimc-web
to open Vim Cheatsheet at https://vim.rtorr.com in the specified locale.
Vim command descriptions are displayed in one of the following languages, depending on the setting of the variable locale
(default value: en_us
).
To set locale, type set locale
in Alfred and choosing from the list. Alternatively, press [x] button on the upper right corner of the Alfred's workflow and go to the "Environment Variables" section.
N.B. Currently, searches are always performed against the cheat sheet in en_us
, regardless of locale
setting.
Locale | Code |
---|---|
العربية | ar |
বাংলা | bn |
Català | ca |
Deutsch | de_de |
English | en_us |
Español | es_es |
Persian | fa_ir |
Français | fr_fr |
עברית | he |
Hrvatski | hr |
Bahasa Indonesia | id |
Italiano | it |
日本語 | ja |
한국어 | ko |
မြန်မာ | mm |
Nederlands | nl_nl |
Norsk | no_nb |
Polski | pl_pl |
Português - Brasil | pt_br |
Português - Portugal | pt_pt |
Romana | ro |
Русский | ru |
සිංහල | si_lk |
Slovenčina | sk |
Svenska | sv |
ภาษาไทย | th |
Türkçe | tr |
Українська | uk |
Tiếng Việt | vi_vn |
简体中文 | zh_cn |
中文 (台灣) | zh_tw |
Yoichiro Hasebe (yohasebe@gmail.com)