local opts = { silent = true } local cr = "" local keymap = vim.keymap.set local runCmd = function(map, cmd) keymap("n", map, cmd .. "", opts) end vim.g.mapleader = " " keymap("i", "jj", "") keymap("n", "", ":noh") keymap("n", "s", "", opts) keymap("i", "jj", "", opts) -- keymap("n", "", "{", opts) -- keymap("n", "", "}", opts) keymap("n", "", "{", opts) keymap("n", "", "}", opts) keymap("n", "", "Sayonara", opts) keymap("n", "f", "Fern . -reveal=% -drawer -toggle -width=23", opts) -- comfortable moation vim.g.comfortable_motion_no_default_key_mappings = 1 -- keymap('n', '', function() -- vim.fn["comfortable_motion#flick"](40) -- end, opts) -- keymap('n', '', function() -- vim.fn["comfortable_motion#flick"](-40) -- end, opts) runCmd("", ":call comfortable_motion#flick(-70)" .. cr) runCmd("", ":call comfortable_motion#flick(70)" .. cr) -- keymap("n", "", "", opts) -- keymap("n", "", "", opts) local function ddu_start(source) -- call ddu#start({'sources': [{'name': 'buffer'}]}) return string.format(":call ddu#start({'sources': [{'name': '%s'}]})", source) end -- ddu keymap keymap("n", "", "Ddu file_rec", opts) -- file open keymap("n", "", "Ddu buffer", opts) -- buffer open keymap("n", "", "Ddu source") -- search sources -- call ddu#start({'sources': [{'name': 'buffer'}]}) keymap("i", "", ddu_start("line"), opts) keymap("t", "", [[]])