add keymap to toggle comment in insert mode
This commit is contained in:
@@ -29,6 +29,8 @@ vmap("J", ":m '>+1<CR>gv=gv")
|
||||
vmap("<", "<gv")
|
||||
vmap(">", ">gv")
|
||||
|
||||
vim.cmd("imap <C-_> <ESC>gccA")
|
||||
|
||||
-- Terminal
|
||||
tmap("<ESC>", "<C-\\><C-n>")
|
||||
nmap("Th", ":lua require('user.utils').open_terminal()<CR>")
|
||||
|
||||
@@ -28,6 +28,12 @@ M.tmap = function(shortcut, command, opts)
|
||||
map("t", shortcut, command, opts)
|
||||
end
|
||||
|
||||
M.imap = function(shortcut, command, opts)
|
||||
opts = opts or {}
|
||||
|
||||
map("i", shortcut, command, opts)
|
||||
end
|
||||
|
||||
M.list_includes_item = function(list, item)
|
||||
for _, value in pairs(list) do
|
||||
if value == item then
|
||||
|
||||
Reference in New Issue
Block a user