----------------------------------------------------------- -- Keymaps of Neovim and installed plugins. ----------------------------------------------------------- local map = vim.api.nvim_set_keymap local default_opts = { noremap = true, silent = true } -- Fast saving with and s map('n', 's', ':w', default_opts) map('i', 's', ':w', default_opts) -- Move around splits using Ctrl + {h,j,k,l} map('n', '', 'h', default_opts) map('n', '', 'j', default_opts) map('n', '', 'k', default_opts) map('n', '', 'l', default_opts) -- Close all windows and exit from Neovim with and q map('n', 'q', ':qa!', default_opts) ----------------------------------------------------------- -- Applications and Plugins shortcuts ----------------------------------------------------------- -- Open terminal map('n', '', ':Term', { noremap = true }) -- nvim-tree map('n', '', ':NvimTreeToggle', default_opts) -- open/close map('n', 'r', ':NvimTreeRefresh', default_opts) -- refresh map('n', 'n', ':NvimTreeFindFile', default_opts) -- search file -- Vista tag-viewer map('n', '', ':Vista!!', default_opts) -- open/close