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")
|
||||||
vmap(">", ">gv")
|
vmap(">", ">gv")
|
||||||
|
|
||||||
|
vim.cmd("imap <C-_> <ESC>gccA")
|
||||||
|
|
||||||
-- Terminal
|
-- Terminal
|
||||||
tmap("<ESC>", "<C-\\><C-n>")
|
tmap("<ESC>", "<C-\\><C-n>")
|
||||||
nmap("Th", ":lua require('user.utils').open_terminal()<CR>")
|
nmap("Th", ":lua require('user.utils').open_terminal()<CR>")
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ M.tmap = function(shortcut, command, opts)
|
|||||||
map("t", shortcut, command, opts)
|
map("t", shortcut, command, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.imap = function(shortcut, command, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
|
||||||
|
map("i", shortcut, command, opts)
|
||||||
|
end
|
||||||
|
|
||||||
M.list_includes_item = function(list, item)
|
M.list_includes_item = function(list, item)
|
||||||
for _, value in pairs(list) do
|
for _, value in pairs(list) do
|
||||||
if value == item then
|
if value == item then
|
||||||
|
|||||||
Reference in New Issue
Block a user