44 lines
1.8 KiB
Lua
44 lines
1.8 KiB
Lua
-----------------------------------------------------------
|
|
-- Keymaps of Neovim and installed plugins.
|
|
-----------------------------------------------------------
|
|
local map = vim.api.nvim_set_keymap
|
|
local default_opts = { noremap = true, silent = true }
|
|
|
|
-- Fast saving with <leader> and s
|
|
map('n', '<leader>s', ':w<CR>', default_opts)
|
|
map('n', '<leader>a', ':w|:luafile %<CR>', default_opts)
|
|
map('n', '<leader>aa', ':w|:luafile %<CR> |:PackerCompile<CR>', default_opts)
|
|
map('i', '<leader>s', '<C-c>:w<CR>', default_opts)
|
|
|
|
-- Move around splits using Ctrl + {h,j,k,l}
|
|
--map('n', '<C-h>', '<C-w>h', default_opts)
|
|
--map('n', '<C-j>', '<C-w>j', default_opts)
|
|
--map('n', '<C-k>', '<C-w>k', default_opts)
|
|
--map('n', '<C-l>', '<C-w>l', default_opts)
|
|
|
|
-- Neovim Tab Navgation via Vem-Tabline
|
|
map('n', '<leader>t', ':tabnew<CR>', default_opts)
|
|
map('n', '<leader>e', ':bnext<CR>', default_opts)
|
|
map('n', '<leader>w', ':bprev<CR>', default_opts)
|
|
map('n', '<leader>d', ':bdelete<CR>', default_opts)
|
|
map('n', '<leader>r', '<Plug>vem_move_buffer_right', default_opts)
|
|
map('n', '<leader>q', '<Plug>vem_move_buffer_left', default_opts)
|
|
|
|
-----------------------------------------------------------
|
|
-- Applications and Plugins shortcuts
|
|
-----------------------------------------------------------
|
|
|
|
-- nvim-tree
|
|
map('n', '<leader>n', ':NvimTreeToggle<CR>', default_opts) -- open/close
|
|
map('n', '<leader>q', ':NvimTreeRefresh<CR>', default_opts) -- refresh
|
|
|
|
-- Place Check box for To-Do style Lists
|
|
map('i','<C-z>', '* [ ] ', default_opts)
|
|
map('n', '<C-z>', '* [ ] ', default_opts)
|
|
|
|
-- Nvim Tree Resize
|
|
map('n', '<leader>=', ':NvimTreeResize +1<CR>', default_opts)
|
|
map('n', '<leader>-', ':NvimTreeResize -1<CR>', default_opts)
|
|
map('n', '<leader>==', ':NvimTreeResize +10<CR>', default_opts)
|
|
map('n', '<leader>--', ':NvimTreeResize -10<CR>', default_opts)
|