From c4bcc944ca73b4e262f8eb698f6cb4254ccaab8c Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Thu, 14 Dec 2023 08:31:26 -0800 Subject: [PATCH] :wrench: Added shortcut for adding backslashes --- .config/nvim/lua/neovim/remap.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/nvim/lua/neovim/remap.lua b/.config/nvim/lua/neovim/remap.lua index d9a05df8..4c9c09cd 100644 --- a/.config/nvim/lua/neovim/remap.lua +++ b/.config/nvim/lua/neovim/remap.lua @@ -93,6 +93,11 @@ vim.keymap.set("n", "r", ":silent :Rg") --toggle autocompletion vim.cmd([[nnoremap cmp :silent lua SetAutoCmp(Mode)]]) +-- appends backslash to end of specified number of lines (min 2) +-- usage: 4b will append a backslash to the end of 4 lines +-- note: useful for grabbing code snippets for chatting with codellama in terminal +vim.cmd([[nnoremap b :.,+=v:count1norm A\]]) + --toggle undotree vim.keymap.set("n", "u", ":UndotreeToggle")