Skip to content

Commit

Permalink
remove DN, add new json environment
Browse files Browse the repository at this point in the history
  • Loading branch information
godbout committed Oct 23, 2023
1 parent e2cbc3f commit fe8bf76
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,10 @@ Make a [request](https://github.com/godbout/kindaVim.docs/issues/139).

# APIs

kindaVim sends [Distributed Notifications](https://developer.apple.com/documentation/foundation/distributednotificationcenter) to macOS when the Vim Mode changes, so that you can hook an external tool like [BetterTouchTool](https://www.google.com/search?q=bettertouchtool) or [Hammerspoon](https://www.hammerspoon.org) and respond to those changes.
The Notifications Names should be self-explanatory:
* kindaVimDidEnterInsertMode
* kindaVimDidExitInsertMode
* kindaVimDidEnterNormalMode
* kindaVimDidExitNormalMode
* kindaVimDidEnterVisualMode
* kindaVimDidExitVisualMode
kindaVim writes the current environment information in a `json` file at `~/Library/Application\ Support/kindaVim/environment.json`.

You can be notified of changes in the file with tools like [watchman](https://github.com/facebook/watchman) and directly read the environment state with tools like [jq](https://github.com/jqlang/jq).
With that information you could for example remap keys differently depending on kindaVim's Mode with tools like [Hammerspoon](https://github.com/Hammerspoon/hammerspoon) or [BetterTouchTool](https://folivora.ai).

# Sync your Preferences

Expand Down

0 comments on commit fe8bf76

Please sign in to comment.