Package: vimwiki-cli
Vimwiki Command-Line Interfacevimwiki-cliis a command-line interface toVimwiki, a plugin for theVimtext editor. It provides a front-end for interactive editor commands
and can be used to automate repetitive tasks such as rebuilding tag metadata and
generating links, all from the command line.Installationvimwiki-cliis available onPyPIand can be installed locally using the
Python Package Installer:$ python -m pip install --user vimwiki-cliOnce installed, issuevimwiki --helpto see usage.ConfigurationFor most installations no configuration is needed, however several environment
variables are available to modify default behavior without the need to pass
global options on the command line:Environment VariableGlobal OptionDescriptionVIMWIKI_EDITOR--editorEditor to launch, defaults to$EDITORorvim.VIMWIKI_COUNT--countIndex of wiki to open.VIMWIKI_SELECT--selectSelect wiki from interactive list.VIMWIKI_OPEN_MATCHES--open-matchesOpen search results by default.VIMWIKI_OPEN_TABS--open-tabsOpen pages in a new tab by default.AdvancedSupported CommandsEach CLI command corresponds to one or more Ex commands executed in the editor.
The following table details the mapping between these commands:CLI CommandEx Commandsvimwiki:VimwikiIndexvimwiki all-html:VimwikiIndex | VimwikiAll2HTMLvimwiki check-links:VimwikiIndex | VimwikiCheckLinksvimwiki diary:VimwikiDiaryIndexvimwiki diary generate-links:VimwikiDiaryIndex | VimwikiDiaryGenerateLinksvimwiki diary today:VimwikiMakeDiaryNotevimwiki diary tomorrow:VimwikiMakeTomorrowDiaryNotevimwiki diary yesterday:VimwikiMakeYesterdayDiaryNotevimwiki generate-links PAGE PATTERN:VimwikiIndex | VimwikiGoto PAGE | VimwikiGenerateLinks PATTERNvimwiki goto PAGE:VimwikiIndex | VimwikiGoto PAGEvimwiki help:help vimwiki.txt | onlyvimwiki search PATTERN:VimwikiIndex | VimwikiSearch PATTERNvimwiki tags generate-links PAGE TAGS:VimwikiIndex | VimwikiGoto PAGE | VimwikiGenerateTagLinks TAGSvimwiki tags rebuild:VimwikiIndex | VimwikiRebuildTagsvimwiki tags search PATTERN:VimwikiIndex | VimwikiSearchTags PATTERNShell CompletionShell completion is available forbash,fish, andzshshells. To generate
an activation script, issue:$ env _VIMWIKI_COMPLETE=source_$(basename $SHELL) vimwiki >/path/to/vimwiki-complete.shOnce generated, the activation script may be sourced directly or from the shell
startup file to provide completion:$ . /path/to/vimwiki-complete.shGit IntegrationFor wikis managed with Git, a pre-commit hook script is available that executes
non-interactive commands to rebuild tag metadata and generate links before
commit.The pre-commit hook relies on the following configuration options:Configuration OptionDescriptionvimwiki.optionsExtra options to pass to thevimwikicommandvimwiki.linkspagePage which contains generated linksvimwiki.taglinkspagePage which contains generated tag linksvimwiki.generatelinksGenerate links before commit (bool)vimwiki.generatediarylinksGenerate diary links before commit (bool)vimwiki.generatetaglinksGenerate tag links before commit (bool)vimwiki.rebuildtagsRebuild tag metadata before commit (bool)vimwiki.allhtmlConvert wiki to HTML before commit (bool)For example, to configure the hook to rebuild tag metadata and generate tag
links in theTagspage before commit, issue:$ git config vimwiki.taglinkspage Tags
$ git config vimwiki.generatetaglinks true
$ git config vimwiki.rebuildtags trueTo enable the hook, copy or linkpre-commit.shto.git/hooks/pre-commitin the wiki directory. Alternatively, ifpre-commitis installed, add apre-commitconfiguration file,.pre-commit-config.yamland runpre-commit autoupdateto enable the latest version of the hook.# See https://pre-commit.com for more information# See https://pre-commit.com/hooks.html for more hooksrepos:-repo:https://github.com/sstallion/vimwiki-clirev:v1.1.0hooks:-id:vimwiki-cliContributingPull requests are welcome! SeeCONTRIBUTING.mdfor more details.LicenseSource code in this repository is licensed under a Simplified BSD License. SeeLICENSEfor more details.