{"id":19837735,"url":"https://github.com/willghatch/vzsh","last_synced_at":"2025-06-14T19:34:03.724Z","repository":{"id":22388583,"uuid":"25725425","full_name":"willghatch/vzsh","owner":"willghatch","description":"nice completion, keymap help, and other goodies for zsh.","archived":false,"fork":false,"pushed_at":"2015-09-10T14:54:58.000Z","size":352,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T22:12:26.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willghatch.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-10-25T08:45:08.000Z","updated_at":"2021-09-21T05:53:05.000Z","dependencies_parsed_at":"2022-08-21T04:00:53.208Z","dependency_job_id":null,"html_url":"https://github.com/willghatch/vzsh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/willghatch/vzsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willghatch%2Fvzsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willghatch%2Fvzsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willghatch%2Fvzsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willghatch%2Fvzsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willghatch","download_url":"https://codeload.github.com/willghatch/vzsh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willghatch%2Fvzsh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259870913,"owners_count":22924590,"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":[],"created_at":"2024-11-12T12:15:25.998Z","updated_at":"2025-06-14T19:34:03.701Z","avatar_url":"https://github.com/willghatch.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"VZSH\n====\n\nvzsh is a project that has grown out of my constant configuration of dotfiles.  I realized that my configuration was huge enough, and that others might benefit if I extracted the more generic parts.  So here it is:  a collection of some useful plugins.  Much of this is stuff that floats around in snippets online that I want to make available to be sourced easily without combing the web.  Some I have improved.  Some I just wrote up myself.  Note that it is in early stages and will change as I have time to hack on it.\n\nNOTICE\n------\n\nI am gutting this and splitting it into separate plugins.  Soon this will be replaced with a starter .zshrc that includes them all and sets some nice options.\n\nStand alone Install\n-------------------\n\nClone the repo and source it.  It depends on my zsh-hooks plugin.\n\nAntigen install\n---------------\n\nSeriously, [zgen](https://github.com/tarjoilija/zgen) is a better way to go about managing zsh plugins.\n\n    zgen load willghatch/zsh-hooks\n    zgen load willghatch/vzsh\n\nor\n\n    zgen load willghatch/zsh-hooks\n    zgen load willghatch/vzsh completion\n    zgen load willghatch/vzsh keys\n\nto get just the parts you want.\n\nConfiguration\n-------------\n\nConfiguration for each sub-plugin is discussed in its section.  Some global configuration that is pulled in by some of the plugins includes variables that you can customize (including some general zsh variables that I just set to some defaults if they're empty):\n\n- VZSH_CACHE - this defaults to $HOME/.cache/zsh, and is automatically created if it doesn't exist.\n- HISTFILE - if you haven't already set it up, this defaults to $VZSH_CACHE/history\n- HISTSIZE - if you haven't already set it up, this defaults to 1000\n- SAVEHIST - if you haven't already set it up, this defaults to 1000\n- REPORTTIME - if you haven't already set it up, this defaults to 5 -- it's the number of seconds for a program to run for it to automatically report time stats.\n- PAGER - if you haven't already set it up, this defaults to \"less\"\n- COMPINSTALL_FILE - defaults to $VZSH_CACHE/compinstall\n\nFeatures\n========\n\nNote that I've moved the snippet submodule [here](https://github.com/willghatch/zsh-snippets), hooks [here](https://github.com/willghatch/zsh-hooks), prompt [here](https://github.com/willghatch/zsh-megaprompt), grml-funcs [here](https://github.com/willghatch/zsh-grml-funcs), and setopt [here](https://github.com/willghatch/zsh-saneopt)\n\nKeys\n----\n\nUseful functions for defining prefix commands (emacs-style!) with built in key listing with C-h.\n\n    define-prefix-command \u003cmapname\u003e # create sub-map\n    bindkey-to-prefix-map \u003cmapname\u003e \u003ckey\u003e \u003ccmd\u003e # bind function to prefix map\n    bind-key \u003cprefix-key\u003e \u003cmapname\u003e # bind the map to a prefix key\n\nPrefix maps automatically have a map listing command bound to $HELP_KEY which lists the bindings in the map (like emacs does it).\nFor now, bindings within maps must be specified with literal characters (including $HELP_KEY), because I haven't written any sort of parser for it.\n\n- VZSH_REMAP_KEYS_P - this defaults to true.  If set to \"true\", the keys plugin maps useful functions from the other plugins, and turns on a hybrid emacs/vi mode (as an emacs evil-mode user, I can promise you it's better that way).\n- VZSH_ADD_HELP_KEY - defaults to true, and is always true if other keys are remapped.  Sets Control-H to be a help prefix -- C-hh gives general help, C-hb lists the current keybindings, C-hs lists available snippets, C-hC-h lists helpers available in help map.\n- HELP_KEY - defaults to 'C-h'.\n\nIf key remapping is set up, it provides the following:\n\ncompletion map (in insert/default mode)\n\n- M-hs - expand snippet (needs snippet module)\n- M-hn - complete word from history (needs completion module)\n- M-hN - complete word from history matching anywhere in the completion (needs completion module)\n- M-hg - GNU generic completion (works for commands that have a standard --help option) (needs completion module)\n- M-he - expand word (eg. $HOME -\u003e /home/wgh) (needs completion module)\n- M-ht - complete word from tmux or screen window (needs completion and grml modules)\n- M-hp - copy last word\n- M-hP - copy last shell word (IE everything in eg. quotes)\n- M-Hd - insert date (needs grml module)\n- M-hm - use a bunch of completers (needs completion module)\n- M-hM - same as above, but matches anywhere in the word\n- tab - normal completion, with 'smartcase' style matching, and matching - to _. (needs completion module)\n- backtab (shift-tab) - same as above, but matching anywhere in the completion, rather than just the start (needs completion module)\n\nNote that if you want to use these completers but you have custom completion setup already, you should read the completion section.\n\nvi command mode stuff:\n- esc - this goes from insert to command mode, so technically this is in the wrong place\n- md - make directory named under cursor (needs grml module)\n- g2 - jump to second word on the command line (needs grml module)\n\nAlso makes ... become ../..\nAnd I decided not to put it... but you should really add this:\n\n    bindkey -M viins 'jk' vi-cmd-mode\n    bindkey -M viins 'kj' vi-cmd-mode\n\nso you can just mash j and k together to get out of insert mode.\n\nsetopt\n------\n\nSet basic, sane default options.\n\ncompletion\n----------\n\nThis module sets up some completion styles (if you have your own defined before this is run they might be overwritten), and defines some completion widgets with different behaviors.  This is most useful if you also source the keys file after, so they are bound.\n\nQuestions? Comments?\n--------------------\n\nI'd like to hear.  Shoot me an email at willghatch@gmail.com.  I would love feedback from some zsh experts -- I don't personally know any, so your feedback would be great.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillghatch%2Fvzsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillghatch%2Fvzsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillghatch%2Fvzsh/lists"}