]> git.gir.st - VimFx.git/commit
Make it possible to create custom hint commands
authorSimon Lydell <simon.lydell@gmail.com>
Wed, 10 Aug 2016 10:08:32 +0000 (12:08 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Wed, 10 Aug 2016 10:19:45 +0000 (12:19 +0200)
commitc4c417368af62e8b27f20121554f4ea03ef81c6e
tree6f47188dd07b227e581825b8ddef9603c8432dc6
parent00eefb392b2d32bf5bfaac689f20e226592387f5
Make it possible to create custom hint commands

My first idea was to use `vim.enterMode('hints', ...)`. However, that's
too complicated to be useful for any user.

Actually, I found that `vim.enterMode(...)` is too complicated for most
(all?) modes, so I decided to make it private (removing it from the
public API) while at it. (I also made the arguments of
`vim.enterMode`/`mode.onEnter` more consistent with each other.)

I also considered exposing the entire "API" that the `f` commands use
internally. However, that's more complicated than the average user
needs, and would increase the API surface _a lot._

Instead, the `f` commands now take a `callbackOverride` argument. This
lets you choose the `f` command that matches the elements you're looking
for and the override what happens when a hint marker is matched.

Fixes #785. Fixes #654.
documentation/api.md
extension/lib/api-frame.coffee
extension/lib/button.coffee
extension/lib/commands.coffee
extension/lib/events-frame.coffee
extension/lib/events.coffee
extension/lib/modes.coffee
extension/lib/vim-frame.coffee
extension/lib/vim.coffee
extension/test/test-api-frame.coffee
Imprint / Impressum