aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2023-06-21 11:12:08 -0600
committerCody Hiar <cody@hiar.ca>2023-06-21 11:12:08 -0600
commitce8ef6b895ac2c1dfb75945d8761b6c266748f6c (patch)
tree4bf1e2f398c9fc114166b3503beac06217f19d0f
parent5704dd54a14e3a53c86dc4c332107b0dbe98a371 (diff)
Add "in line" text object
-rw-r--r--init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 5efb850..b76b95d 100644
--- a/init.lua
+++ b/init.lua
@@ -154,6 +154,9 @@ vim.api.nvim_set_keymap('n', '<leader>psl', '<cmd>LanguageToolClear<cr>', { nore
vim.api.nvim_set_keymap('n', '<leader>pc', '<cmd>cclose<cr><cmd>lclose<cr>', { noremap = true })
vim.api.nvim_set_keymap('n', '<leader>pg', '<cmd>Goyo<cr>', { noremap = true })
vim.api.nvim_set_keymap('n', '<leader>pp', 'vipJVgq', { noremap = true })
+-- Add "il" text object to mean "in line"
+vim.api.nvim_set_keymap('x', 'il', 'g_o^', { noremap = true })
+vim.api.nvim_set_keymap('o', 'il', ':normal vil<cr>', { noremap = true })
-- Build a custom status line
local status_line = {