dotfiles/nvim/custom/mappings.lua

64 lines
1.3 KiB
Lua
Raw Normal View History

2022-07-01 11:32:35 +02:00
local M = {}
M.general = {
2022-07-11 14:13:05 +02:00
n = {
["<leader> "] = { ":noh<CR>", "Clean search highlight" },
},
v = {
["J"] = { ":m '>+1<CR>gv=gv", "Move visual block up" },
["K"] = { ":m '>-2<CR>gv=gv", "Move visual block down" },
["<"] = { "<gv", "Keep visual on shift" },
[">"] = { ">gv", "Keep visual on shift" },
}
}
M.harpoon = {
2022-07-01 11:32:35 +02:00
n = {
["<leader>ss"] = {
function()
require("harpoon.ui").toggle_quick_menu()
end,
" harpoon show menu"
},
["<leader>sa"] = {
function()
require("harpoon.mark").add_file()
end,
" harpoon add file"
},
["<leader>su"] = {
function()
require("harpoon.ui").nav_file(1)
end,
" harpoon go to file 1"
},
["<leader>si"] = {
function()
require("harpoon.ui").nav_file(2)
end,
" harpoon go to file 2"
},
["<leader>so"] = {
function()
require("harpoon.ui").nav_file(3)
end,
" harpoon go to file 3"
},
["<leader>sp"] = {
function()
require("harpoon.ui").nav_file(4)
end,
" harpoon go to file 4"
},
}
}
M.telescope = {
n = {
["<leader>fg"] = { "<cmd> Telescope live_grep <CR>", " live grep" },
["<leader>fm"] = { "<cmd> Telescope marks <CR>", " marks" },
}
}
return M