2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-21 04:53:24 +00:00
Hilbish/docs/vim-mode/actions.md
sammyette e5eefb1d2d
refactor!: rework docs and doc command (#218)
changes the actual file format of docs to markup since that's basically what we have been
using in the first place.

the docgen command has been modified to write markdown headings with the function name and
yaml metadata for easy consumption by hugo for the website.

all other docs have been moved to markdown as well this is the main reason this is a "breaking" change
users will have to reinstall hilbish (task uninstall and task install) to remove the old plaintext docs
2022-12-15 00:00:54 -04:00

640 B

Vim actions are essentially just when a user uses a Vim keybind. Things like yanking and pasting are Vim actions. This is not an "offical Vim thing," just a Hilbish thing.

The hilbish.vimAction hook is thrown whenever a Vim action occurs. It passes 2 arguments: the action name, and an array (table) of args relating to it.

Here is documentation for what the table of args will hold for an appropriate Vim action.

  • yank: register, yankedText The first argument for the yank action is the register yankedText goes to.

  • paste: register, pastedText The first argument for the paste action is the register pastedText is taken from.