----------------------------------------------------------- -- 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('n', 'a', ':w|:luafile %', default_opts) map('n', 'aa', ':w|:luafile % |:PackerSync', default_opts) map('i', 's', ':w', default_opts) -- Python Script that saves the file & moves Todos to my Todolist. map('n', 'sd', ':w|:! python3 ~/Documents/Northpass/Scripts/TodoMD/todo.py %', default_opts) -- Neovim Tab Navgation via Vem-Tabline map('n', 't', ':tabnew', default_opts) map('n', 'e', ':bnext', default_opts) map('n', 'w', ':bprev', default_opts) map('n', 'd', ':bdelete', default_opts) map('n', 'r', 'vem_move_buffer_right', default_opts) map('n', 'q', 'vem_move_buffer_left', default_opts) ----------------------------------------------------------- -- Applications and Plugins shortcuts ----------------------------------------------------------- -- nvim-tree map('n', 'n', ':NvimTreeToggle', default_opts) -- open/close map('n', 'q', ':NvimTreeRefresh', default_opts) -- refresh -- Place Check box for To-Do style Lists map('i','', '* [ ] ', default_opts) map('n', '', '* [ ] ', default_opts) -- Nvim Tree Resize map('n', '=', ':NvimTreeResize +1', default_opts) map('n', '-', ':NvimTreeResize -1', default_opts) map('n', '==', ':NvimTreeResize +10', default_opts) map('n', '--', ':NvimTreeResize -10', default_opts) ----------------------------------------------------------- -- Telescope Keymaps ----------------------------------------------------------- map('n', 'ff', ':Telescope find_files', default_opts) map('n', 'fg', ':Telescope live_grep', default_opts) map('n', 'fb', ':Telescope buffers', default_opts) map('n', 'fe', ':Telescope file_browser', default_opts)