----------------------------------------------------------- -- 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) -- 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) Mapper = require("nvim-mapper") local M = Mapper.map -- For Neovim >= 0.7.0 M('n', 'P', ":MarkdownPreview", {silent = true, noremap = true}, "Markdown", "md_preview", "Display Markdown preview in Qutebrowser") M('n', 'fe', ":Telescope file_browser", {silent=true, noremap=true}, "Telescope", "telescope-file-browser", "Find files and directories in telescope") M('n', '', "@t",{silent=true, noremap=true}, "Todo Comments", "todo_todo", "Add To-do/Task to the beginning of the line") M('n', '', "@s", {silent=true, noremap=true}, "Todo Comments", "todo_seng", "Add Solutions Engineering to the beginning of the line") M('n', '', "@f", {silent=true, noremap=true}, "Todo Comments", "todo_feat", "Add Feature Request tag to the beginning of the line. ") M('n', '', "@c", {silent=true, noremap=true}, "Todo Comments", "todo_complete", "Replace tag with Complete tag at beginning of the line.") M('n', '', "@w", {silent=true, noremap=true}, "Todo Comments", "todo_error", "Add Warning/Error tag at the beginning of the line.")