local options = { noremap = true } -- Source init.lua vim.api.nvim_set_keymap('n', 'so', 'source ~/.config/nvim/init.lua', options) -- Don't copy "c" changes to primary register vim.api.nvim_set_keymap('n', 'c', '"_c', options) -- Easily open splits vim.api.nvim_set_keymap('n', 'hs', 'split', options) vim.api.nvim_set_keymap('n', 'vs', 'vsplit', options) -- Copy the entire file vim.api.nvim_set_keymap('n', 'y', 'ggyG', options) -- Manually store session vim.api.nvim_set_keymap('n', '', 'mksession! ~/.cache//nvim/session/manual_session.vim', options) -- Restore manually stored session vim.api.nvim_set_keymap('n', '', 'source ~/.cache/nvim/session/manual_session.vim', options) -- Restore auto saved session created on exit vim.api.nvim_set_keymap('n', '', 'source ~/.cache/nvim/session/shutdown_session.vim', options) -- Replace all is aliased to S. vim.api.nvim_set_keymap('n', '', '%s//g', options) -- Navigating with guides vim.api.nvim_set_keymap('n', '', '/<++>"_c4l', options) vim.api.nvim_set_keymap('i', '', '/<++>"_c4l', options) vim.api.nvim_set_keymap('v', '', '/<++>"_c4l', options) -- Spell-check vim.api.nvim_set_keymap('n', 'o', 'setlocal spell! spelllang=en_au', options) -- Keep highlight when indenting vim.api.nvim_set_keymap('v', '<', '', '>gv', options) -- Tab navigation vim.api.nvim_set_keymap('n', '', '1gt', options) vim.api.nvim_set_keymap('n', '', '2gt', options) vim.api.nvim_set_keymap('n', '', '3gt', options) vim.api.nvim_set_keymap('n', '', '4gt', options) vim.api.nvim_set_keymap('n', '', '5gt', options) vim.api.nvim_set_keymap('n', '', '6gt', options) vim.api.nvim_set_keymap('n', '', '7gt', options) vim.api.nvim_set_keymap('n', '', '8gt', options) vim.api.nvim_set_keymap('n', '', '9gt', options)