Changes keybinds in Neovim to use the Kakoune workflow
- Neovim 0.7+
From the Codeberg repo (recommended)
{
"kak.nvim",
url = "https://codeberg.org/mirge/kak.nvim.git",
--version = "^7", -- if you don't want breaking changes
event = "VeryLazy", -- load after other plugins, to avoid conflicts
opts = {
-- your configuration here
},
}From the GitHub repo
{
"mirlge/kak.nvim",
--version = "^7", -- if you don't want breaking changes
event = "VeryLazy", -- load after other plugins, to avoid conflicts
opts = {
-- your configuration here
},
}WhichKey integration
Add this to the plugin spec:
dependencies = { "folke/which-key.nvim" },-- you don't have to pass in the table to the setup function
require("kak").setup({
-- your configuration here
}){
full = true, -- if set to false, it disables all keybinds except Normal mode c, d, x, y
which_key_integration = true, -- which-key text objects integration
experimental = { -- experimental features
rebind_visual_aiAI = false, -- if set to true, rebinds Visual mode `[aiAI]` keybinds to act like they do in Normal mode,
} -- except that `[ai]` goes to the corresponding end of the selection. however, this
} -- makes it so you can only use the default keybinds with `<A-[ai]>`c->vcd->vdx->Vy->vy
<A-[ft]>: Extend selection backwards with the key[HJKLWBEFT]: Extend selection with the lowercase key<A-[ai]>: Around/inside[hjkl]: Exit Visual mode first[wbeft]: Create new selection with key<A-[wbe]>: Extend selection with the key<A-j>: Join lines<A-[hl]>: Create new selection going all the way to the corresponding end of the lineg[hl]: Go all the way to the corresponding end of the lineg[ge]: Jump to buffer start/endg[tcb]: <key at the same place in[HML]>, but exit Visual mode firstg[jk]: Jump to buffer bottom/topG[hl]: Extend selection all the way to the corresponding end of the lineG[ge]: Extend selection to buffer start/endG[tcb]: <key at the same place in[HML]>, but extend selectionG[jk]: Extend selection to buffer bottom/top<A-[oO]>: Do the same as[oO], except that they move the cursor to the same position that it was in before they were executed, or, in Visual mode, reselect the previous Visual mode selection
R: Replace the character which the cursor is on with yanked content
[ai]: If experimental optionrebind_visual_aiAIis enabled, append/insert (to Insert mode) on the corresponding end of the selection[pP]: Paste at the corresponding end of the selectionR: Replace selection with yanked content<A-;>: Goes to the other end of the selection[oO]: Do the same thing as they do in Normal mode, on their corresponding end of the selection
- Readd
<A-[ai]>keybinds- Readd only the
<A-[ai]>keybinds - Readd key rebind of Visual mode
[aiAI]keybinds, but as experimental opt-in
- Readd only the
- Add
Gkeybinds (g, but extends selection)- Make all
gkeybinds leave Visual mode before executing them
- Make all
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.