local opts = { noremap = true, silent = true } local term_opts = { silent = true } --local keymap = vim.keymap local keymap = vim.keymap.set local runCmd = function(map, cmd) keymap("n", map, cmd .. "", opts) end local cr = "" vim.g.mapleader = " " --Remap space as leader key keymap("", "", "", opts) vim.g.mapleader = " " vim.g.maplocalleader = " " keymap("n", "s", "", opts) keymap("i", "jj", "", opts) keymap("n", "", "{", opts) keymap("n", "", "}", opts) keymap("t", "", "", opts) -- runCmd("", ":Sayonara") -- runCmd("", ":Telescope find_files") -- runCmd("", ":Telescope buffers") -- runCmd("", ":Telescope commands") -- runCmd("", ":Telescope live_grep") runCmd("", ":Ddu buffer") runCmd("", ":Ddu file_rec") runCmd("sp", ":split") runCmd("sv", ":vs") runCmd("r", ":QuickRun") runCmd("bn", ":bnext") runCmd("bp", ":bprev") runCmd("", ":noh") runCmd("", ":call comfortable_motion#flick(-70)" .. cr) runCmd("", ":call comfortable_motion#flick(70)" .. cr) runCmd("", ":Deol -split=floating -winheight=20 -winwidth=80" .. cr) if vim.g.neovide then keymap("n", "", '"+y', opts) keymap("v", "", '"+y', opts) keymap("n", "", '"+p', opts) keymap("i", "", "+", opts) keymap("c", "", "+", opts) keymap("i", "", "", opts) end runCmd("r", ":RunIt" .. cr) runCmd("", ":Fq" .. cr) keymap("i", "", ":w" .. "", opts) runCmd("s", ":SymbolsOutline" .. cr) runCmd("f", ":Fern . -reveal=% -drawer -toggle -width=30" .. cr) -- runCmd("", "" .. cr) -- runCmd("", "" .. cr) keymap("n", "", ":FuzzyMotion" .. cr) keymap("n", "", ":MundoToggle" .. cr) keymap("n", "t", ":lua require'mr-telescope'.mr()" .. cr) -- vim.keymap.set("c", "", "(kensaku-search-replace)" .. cr) vim.cmd("cnoremap (kensaku-search-replace)") -- keymap("n", ":", ":FineCmdline" .. cr) -- nnoremap : FineCmdline