config/modules/nixvim/keymaps.nix
2025-04-21 14:46:41 -07:00

42 lines
925 B
Nix

{pkgs, ...}: {
programs.nixvim = {
keymaps = [
# Keybinds to make split navigation easier.
# Use CTRL+<hjkl> to switch between windows
#
# See `:help wincmd` for a list of all window commands
{
mode = "n";
key = "<C-h>";
action = "<C-w><C-h>";
options = {
desc = "Move focus to the left window";
};
}
{
mode = "n";
key = "<C-l>";
action = "<C-w><C-l>";
options = {
desc = "Move focus to the right window";
};
}
{
mode = "n";
key = "<C-j>";
action = "<C-w><C-j>";
options = {
desc = "Move focus to the lower window";
};
}
{
mode = "n";
key = "<C-k>";
action = "<C-w><C-k>";
options = {
desc = "Move focus to the upper window";
};
}
];
};
}