-- map the key (sequence) to a command local function map(mode, lhs, rhs, opts) local options = { noremap = true } if opts then options = vim.tbl_extend("force", options, opts) end vim.api.nvim_set_keymap(mode, lhs, rhs, options) end -- open terminal map("n", "ot", ":ToggleTerm") -- exit terminal mode map("t", "", "") -- open tree map("n", "op", ":NvimTreeToggle") -- telescope map("n", "to", ":Telescope") map("n", "tf", ":Telescope find_files") map("n", "tg", ":Telescope live_grep")