local map = require("core.utils").map -- general map("n", "", "write!") map("i", "jk", "") map("n", "h", "nohlsearch") map("n", "/", "(comment_toggle_current_linewise)") --- buffers map("n", "", "bp!") map("n", "", "bn!") map("n", "c", "bdelete!") map("n", "q", "quit!") map("n", "w", "write!") -- select in pupup by C-j & C-k map("i", "", 'pumvisible() ? "\\" : "\\"', true) map("i", "", 'pumvisible() ? "\\" : "\\"', true) map("c", "", 'pumvisible() ? "\\" : "\\"', true) map("c", "", 'pumvisible() ? "\\" : "\\"', true) -- window navigation and resize map("n", "", "wincmd h") map("n", "", "wincmd j") map("n", "", "wincmd k") map("n", "", "wincmd l") map("n", "", "vertical resize -2") map("n", "", "resize +2") map("n", "resize -1") map("n", "", "vertical resize +2") -- move strings map("i", "", ":m .+1==gi") map("i", "", ":m .-2==gi") map("v", "K", ":move '<-2gv-gv") map("v", "J", ":move '>+1gv-gv") map("n", "", ":m .+1==") map("n", "", ":m .-2==") map("v", "<", "", ">gv") -- plugins map("n", "e", "NvimTreeToggle") map("n", "ps", "PackerSync") map("n", "n", "Neorg") -- telescope map("n", "f", "Telescope find_files") map("n", "b", "Telescope buffers") map("n", "sr", "Telescope oldfiles") map("n", "sb", "Telescope git_branches") map("n", "st", "Telescope live_grep") map("n", "sp", "Telescope projects") -- git map("n", "gg", "Neogit") map("n", "gj", "lua require[[gitsigns]].next_hunk()") map("n", "gk", "lua require[[gitsigns]].prev_hunk()") map("n", "gs", "lua require[[gitsigns]].stage_hunk()") map("n", "gr", "lua require[[gitsigns]].reset_hunk()") map("n", "gp", "lua require[[gitsigns]].preview_hunk()")