Add wordmotion & splitjoin

This commit is contained in:
2024-12-27 18:11:51 +01:00
parent f942e31ea1
commit 9fe77ac650
2 changed files with 31 additions and 2 deletions
+28 -1
View File
@@ -6,5 +6,32 @@ return {
after = function()
require("nvim-surround").setup({})
end,
}
},
{
"vim-wordmotion",
lazy = false,
load = function() end,
keys = {
-- This overrides the default ge & gw but i never used them.
{ "gw", "<plug>WordMotion_w", desc = "Next small world", mode = { "n", "x", "o" } },
{ "ge", "<plug>WordMotion_e", desc = "Next end of small world", mode = { "n", "x", "o" } },
{ "gb", "<plug>WordMotion_b", desc = "Previous small world", mode = { "n", "x", "o" } },
{ "igw", "<plug>WordMotion_iw", desc = "inner small word", mode = { "x", "o" } },
{ "agw", "<plug>WordMotion_aw", desc = "a small word (with white-space)", mode = { "x", "o" } },
},
after = function()
vim.g.wordmotion_nomap = true
end,
},
{
"increment-activator",
lazy = false,
load = function() end,
keys = {
{ "<C-A>", desc = "Increment" },
{ "<C-X>", desc = "Decrement" },
},
},
}
+3 -1
View File
@@ -88,7 +88,9 @@ vim.api.nvim_create_autocmd("TextYankPost", {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
vim.highlight.on_yank({
higroup = 'Visual',
})
end,
})