dotfiles/.config/nvim/lua/maps.lua

28 lines
910 B
Lua
Raw Normal View History

local map = vim.api.nvim_set_keymap
2021-09-01 00:15:10 +02:00
2021-04-20 14:34:02 +02:00
-- Getting stuck in ~~vim~~ terminal
2021-04-20 14:43:22 +02:00
map("t", "<Esc>", "<C-\\><C-n>", {})
2021-09-11 18:13:25 +02:00
-- telescope
map("n", "ff", "<cmd>Telescope find_files<cr>", { silent = true })
map("n", "fg", "<cmd>Telescope live_grep<cr>", { silent = true })
2021-04-20 14:34:02 +02:00
2022-05-15 16:42:11 +02:00
-- neoterm.nvim
map("n", "tt", "<cmd>NeotermToggle<cr>", { silent = true })
map("n", "tr", ":NeotermRun<space>", {})
map("n", "te", "<cmd>NeotermExit<cr>", { silent = true })
map("n", "ta", "<cmd>NeotermRerun<cr>", { silent = true })
2021-04-20 14:34:02 +02:00
-- Quick cursor movement
2021-04-20 14:43:22 +02:00
map("n", "<C-Down>", "5j", { noremap = true })
map("n", "<C-Up>", "5k", { noremap = true })
2021-04-20 14:34:02 +02:00
-- Quick pasting/yoinking to system register
2021-11-05 17:18:00 +01:00
map("n", "+y", '"+y', { noremap = true })
map("n", "+p", '"+p', { noremap = true })
map("n", "+d", '"+d', { noremap = true })
2021-04-20 14:34:02 +02:00
2021-11-05 17:18:00 +01:00
map("n", "*y", '"*y', { noremap = true })
map("n", "*p", '"*p', { noremap = true })
map("n", "*d", '"*d', { noremap = true })