dotfiles/nvim/.config/nvim/after/plugin/various-textobjs.lua
Sanchayan Maity c800b66cbf
nvim: plugins: Switch to nvim-various-textobjs
We never really used the comment text object and functionality of the
other two are provided in nvim-various-textobjs.
2023-03-15 10:49:06 +05:30

9 lines
650 B
Lua

require("various-textobjs").setup({ useDefaultKeymaps = false })
vim.keymap.set({"o", "x"}, "ae", function () require("various-textobjs").entireBuffer() end)
vim.keymap.set({"o", "x"}, "ii", function () require("various-textobjs").indentation(true, true) end)
vim.keymap.set({"o", "x"}, "ai", function () require("various-textobjs").indentation(false, true) end)
vim.keymap.set({"o", "x"}, "as", function () require("various-textobjs").subword(false) end)
vim.keymap.set({"o", "x"}, "is", function () require("various-textobjs").subword(true) end)
vim.keymap.set({"o", "x"}, "?" , function () require("various-textobjs").toNextClosingBracket() end)