small keymap tweaks

This commit is contained in:
Andy Teijelo 2022-11-03 11:11:08 -04:00
parent 66001689a5
commit 35bb137263

View file

@ -44,8 +44,8 @@ end
keymap("n", "<leader>h", "<cmd>nohlsearch<CR>", opts) keymap("n", "<leader>h", "<cmd>nohlsearch<CR>", opts)
-- Close buffers -- Close buffers
keymap("n", "<S-q>", "<cmd>Bdelete<CR>", opts) keymap("n", "<M-q>", "<cmd>Bdelete<CR>", opts)
keymap("n", "<S-q>", "<cmd>Bdelete!<CR>", opts) keymap("n", "<M-Q>", "<cmd>Bdelete!<CR>", opts)
-- Better paste -- Better paste
keymap("v", "p", '"_dP', opts) keymap("v", "p", '"_dP', opts)
@ -74,8 +74,8 @@ keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts)
--keymap("n", "<leader>gg", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts) --keymap("n", "<leader>gg", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
-- Comment -- Comment
keymap("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>", opts) keymap("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<cr>", opts)
keymap("x", "<leader>/", '<ESC><CMD>lua require("Comment.api").toggle_linewise_op(vim.fn.visualmode())<CR>') keymap("x", "<leader>/", '<esc><cmd>lua require("Comment.api").toggle_linewise_op(vim.fn.visualmode())<cr>')
-- DAP -- DAP
keymap("n", "<F9>", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", opts) keymap("n", "<F9>", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", opts)
@ -99,10 +99,8 @@ keymap("n", "<F17>", "<cmd>lua require'dap'.terminate()<cr>", opts) -- Shift+F5
--keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts) --keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts)
-- move.vim -- move.vim
-- Normal-mode commands vim.keymap.set('n', '<A-j>', '<cmd>MoveLine(1)<cr>', opts)
vim.keymap.set('n', '<A-j>', ':MoveLine(1)<CR>', opts) vim.keymap.set('n', '<A-k>', '<cmd>MoveLine(-1)<cr>', opts)
vim.keymap.set('n', '<A-k>', ':MoveLine(-1)<CR>', opts) vim.keymap.set('v', '<A-j>', '<cmd>MoveBlock(1)<cr>', opts)
vim.keymap.set('v', '<A-k>', '<cmd>MoveBlock(-1)<cr>', opts)
-- Visual-mode commands
vim.keymap.set('v', '<A-j>', ':MoveBlock(1)<CR>', opts)
vim.keymap.set('v', '<A-k>', ':MoveBlock(-1)<CR>', opts)