keybind-audit
Analyze keybindings across all dotfiles for conflicts, duplicates, and inconsistencies. Use when modifying keybindings or checking for conflicts.
When & Why to Use This Skill
The Keybind Audit skill is a specialized utility designed for developers to maintain a seamless workflow by analyzing keyboard shortcuts across multiple configuration files (dotfiles). It automatically scans tools like Neovim, tmux, zsh, and Alacritty to detect overlapping conflicts, redundant duplicates, and inconsistent mappings. By providing a centralized audit of your development environment, it ensures that new shortcuts don't break existing ones and helps maintain a unified 'Vim-style' experience across all terminal-based applications.
Use Cases
- Conflict Detection: Identify and resolve 'shadowed' commands where the same key combination (e.g., Ctrl+G) performs different, conflicting actions in tmux versus the shell.
- Dotfile Optimization: Scan Neovim and Vim configurations to find and remove duplicate key mappings spread across multiple Lua or Vimscript files.
- Workflow Standardization: Ensure consistent navigation patterns (like hjkl or leader-key sequences) are applied uniformly across different tools like Obsidian, Alacritty, and terminal multiplexers.
- Safe Configuration Updates: Audit your entire setup before adding new global hotkeys to prevent accidental overwriting of essential default system bindings.
| name | keybind-audit |
|---|---|
| description | Analyze keybindings across all dotfiles for conflicts, duplicates, and inconsistencies. Use when modifying keybindings or checking for conflicts. |
Keybind Audit
Analyze keybindings across all configuration files in this dotfiles repository.
When to use
- User wants to add or modify a keybinding
- User asks about keybinding conflicts
- User wants to check consistency across tools
Target files
| Tool | File | Pattern |
|---|---|---|
| zsh | dot_zshrc.tmpl |
bindkey |
| tmux | dot_tmux.conf |
bind, bind-key |
| vim | dot_vimrc |
nnoremap, vnoremap, inoremap, cnoremap |
| neovim | dot_config/nvim/lua/keymap.lua |
vim.keymap.set, nvim_set_keymap |
| neovim plugins | dot_config/nvim/lua/plugin_configs/*.lua |
vim.keymap.set, keymaps in setup() |
| obsidian | dot_obsidian.vimrc |
nmap, vmap, exmap |
| alacritty | dot_config/alacritty/alacritty.toml |
[[keyboard.bindings]] |
Analysis checklist
Cross-tool conflicts: Same key combo, different behavior across tools
- Focus on: Ctrl+key, Alt+key, leader combinations
- Example:
<C-g>in tmux vs zsh
Duplicates: Same keybinding defined multiple times within one tool
- Example:
j -> gjin both dot_vimrc and nvim/lua/keymap.lua
- Example:
Consistency: Check vim-style navigation unity
- Are hjkl mapped consistently?
- Is
<leader>fj/fk/flpattern consistent?
Shadowed defaults: Overwritten important defaults that may cause confusion
Dead bindings: Commented-out bindings that might be worth revisiting
Output format
Group by severity:
Conflicts (must fix)
- Key:
<C-x> - Tools: tmux (kill-pane) vs zsh (execute)
- Recommendation: ...
Duplicates (should fix)
- Key:
j -> gj - Files: dot_vimrc:1, keymap.lua:9
- Recommendation: Keep only in keymap.lua
Inconsistencies (consider)
- ...
Info
- ...