function map(mode, shortcut, command) vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true }) end function nmap(shortcut, command) map('n', shortcut, command) end function imap(shortcut, command) map('i', shortcut, command) end function xmap(shortcut, command) map('x', shortcut, command) end nmap("","") xmap("p",'\"_dP') nmap("fg", "lua require('telescope.builtin').live_grep()") nmap("fb", "lua require('telescope.builtin').buffers()") nmap("fh", "lua require('telescope.builtin').help_tags()") nmap("ff", "lua require('telescope.builtin').find_files()") nmap("b","lua require('telescope.builtin').buffers()") nmap("",":NvimTreeToggle") nmap("r",":NvimTreeRefresh") nmap("n",":NvimTreeToggle")