|
@ -1,5 +1,9 @@ |
|
|
local options = { noremap = true } |
|
|
local options = { noremap = true } |
|
|
|
|
|
|
|
|
|
|
|
-- Source init.lua |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<leader>so', '<cmd>source ~/.config/nvim/init.lua<CR>', options) |
|
|
|
|
|
|
|
|
|
|
|
-- Don't copy "c" changes to primary register |
|
|
vim.api.nvim_set_keymap('n', 'c', '"_c', options) |
|
|
vim.api.nvim_set_keymap('n', 'c', '"_c', options) |
|
|
|
|
|
|
|
|
-- Easily open splits |
|
|
-- Easily open splits |
|
@ -10,9 +14,9 @@ vim.api.nvim_set_keymap('n', '<leader>vs', '<cmd>vsplit<cr>', options) |
|
|
vim.api.nvim_set_keymap('n', '<leader>y', 'ggyG<C-o>', options) |
|
|
vim.api.nvim_set_keymap('n', '<leader>y', 'ggyG<C-o>', options) |
|
|
|
|
|
|
|
|
-- Manually store session |
|
|
-- Manually store session |
|
|
vim.api.nvim_set_keymap('n', '<F5>', '<cmd>mksession! ~/.cache//nvim/session/manual_session.vim<cr>', options) |
|
|
|
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<F5>', '<cmd>mksession! ~/.cache//nvim/session/manual_session.vim<CR>', options) |
|
|
-- Restore manually stored session |
|
|
-- Restore manually stored session |
|
|
vim.api.nvim_set_keymap('n', '<F6>', '<cmd>source ~/.cache/nvim/session/manual_session.vim<cr>', options) |
|
|
|
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<F6>', '<cmd>source ~/.cache/nvim/session/manual_session.vim<CR>', options) |
|
|
-- Restore auto saved session created on exit |
|
|
-- Restore auto saved session created on exit |
|
|
vim.api.nvim_set_keymap('n', '<F7>', '<cmd>source ~/.cache/nvim/session/shutdown_session.vim<CR>', options) |
|
|
vim.api.nvim_set_keymap('n', '<F7>', '<cmd>source ~/.cache/nvim/session/shutdown_session.vim<CR>', options) |
|
|
|
|
|
|
|
@ -27,15 +31,17 @@ vim.api.nvim_set_keymap('v', '<leader><leader>', '<Esc>/<++><Enter>"_c4l', optio |
|
|
-- Spell-check |
|
|
-- Spell-check |
|
|
vim.api.nvim_set_keymap('n', '<leader>o', '<cmd>setlocal spell! spelllang=en_au<cr>', options) |
|
|
vim.api.nvim_set_keymap('n', '<leader>o', '<cmd>setlocal spell! spelllang=en_au<cr>', options) |
|
|
|
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A->>', '<Cmd>BufferMoveNext<CR>', options) |
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', options) |
|
|
|
|
|
|
|
|
-- Keep highlight when indenting |
|
|
|
|
|
vim.api.nvim_set_keymap('v', '<', '<gv', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('v', '>', '>gv', options) |
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-1>', '1gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-2>', '2gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-3>', '3gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-4>', '4gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-5>', '5gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-6>', '6gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-7>', '7gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-8>', '8gt', options) |
|
|
|
|
|
vim.api.nvim_set_keymap('n', '<A-9>', '9gt', options) |
|
|
|
|
|
|