vim.g.mapleader = " " local map = vim.api.nvim_set_keymap local cmap = vim.keymap.set local options = { noremap = true } local cmd_options = { noremap = true, silent = true } local tele = require('telescope.builtin') local neogit = require('neogit') -- open git integration map("n", "g", "Neogit kind=split", options) -- TELESCOPE cmap("n", "ff", tele.find_files, options) map("n", "fh", "Telescope find_files hidden=true", options) cmap("n", "fg", tele.git_files, options) cmap("n", "fs", function() tele.grep_string({ search = vim.fn.input("Grep > ") }); end) -- slef explanitory map("n", "tw", "lua MiniTrailspace.trim()", options) map("n", "fm", "CHADopen", options) map("n", "tt", "12 split Tnew", options) map("n", "zt", "Twilight", options) map("n", "zz", "ZenMode", options) -- remap keys so that they dont skip camelCase map("n", "w", "CamelCaseMotion_w", cmd_options) map("n", "b", "CamelCaseMotion_b", cmd_options) map("n", "e", "CamelCaseMotion_e", cmd_options) map("n", "ge", "CamelCaseMotion_ge", cmd_options) -- Dashboard and pomodoro map("n", "v", "Veil", options) map("n", "p", "NomoMenu", options) -- this little guy helps you move text, really helpful map("v", "J", ":m '>+1gv=gv", options) map("v", "K", ":m '<-2gv=gv", options) -- Cursor always stays on center map("n", "J", "mzJ`z", options) map("n", "", "zz", options) map("n", "", "zz", options) map("n", "n", "nzzzv", options) map("n", "N", "Nzzzv", options) -- paste text but DONT copy the overridden text cmap("x", "p", [["_dP]]) cmap("x", "p", [["+dP]]) -- delete text but DONT copy to clipboard cmap({ "n", "v" }, "d", [["_d]]) -- quickfix stuff -- -- map("n", "", "cnextzz", options) map("n", "", "cprevzz", options) map("n", "k", "lnextzz", options) map("n", "j", "lprevzz", options) -- search and replace every instance of word under cursor cmap("n", "s", [[:%s/\<\>//gI]]) -- take a break ! map("n", "mr", "CellularAutomaton make_it_rain", options)