|Fielding Johnston 2893ca3566 Refactor key to direction mapping from conditional to utilizing map||1 year ago|
|plugin||1 year ago|
|README.md||1 year ago|
This plugin will allow you to navigate seamlessly between Vim/Neovim splits and native mac os windows managed by chunkwm using a consistent set of hotkeys. The secret sauce that allows this to work is the combination of Åsmund Vikane's chunkwm, a tiling window manager, and a hotkey daemon(e.g. khd or skhd).
This is oh so heavily based off Chris Toomey's vim-tmux-navigator. For educational purposes I have structured the code like vim-tmux-navigator due to my lack of vimscript experience. I have taken the time to implement everything as if it were from scratch in a progressive manner (as the need presented itself) for my educational benefit. In the end, I hope to have scratched my own itch, while deepening my vim knownledge.
This plugin provides the following mappings which allow you to move between Vim/Neovim pane splits and native macos windows seamlessly.
Note - Even if you use a modal hotkey daemon, you can bind these to the default mode.
If you want to use alternate key mappings, see the [configuration section below].
If you don't have a preferred installation method, I recommend using vim-plug. Assuming you have vim-plug installed and configured, the following steps will install the plugin:
Add the following line to your
# allow chunkwm to pass through ctrl-h/j/k/l so that vim can switch panes without triggering shell escape characters '"\C-l":' '"\C-h":' '"\C-j":' '"\C-k":'
For skhd edit any existing bindings to
ctrl - h,
ctrl - j,
ctrl - l in
~/.skhdrc to match the following snippet:
ctrl - h -> : if ; then chunkc tiling::window --focus west; fi ctrl - l -> : if ; then chunkc tiling::window --focus west; fi ctrl - j -> : if ; then chunkc tiling::window --focus west; fi ctrl - k -> : if ; then chunkc tiling::window --focus west; fi
previousto the list of binds/focus change options