Compare commits

...

3 Commits

3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,9 @@
-- Plugin to automatically create and restore simple sessions
return {
'rmagatti/auto-session',
config = function()
require('auto-session').setup {
auto_session_enable_last_session = true,
}
end,
}

View File

@ -0,0 +1,4 @@
-- Plugin to intelligently reopen files at last edit position
return {
'farmergreg/vim-lastplace',
}

View File

@ -41,6 +41,8 @@ vim.keymap.set('v', '<leader>pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' })
vim.keymap.set('n', '<leader>cd ', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' })
-- Navigate to 'base' directory, the initial dir that nvim was run in
vim.keymap.set('n', '<leader>cdh', '<cmd>cd ' .. vim.g.base_dir .. '<cr>', { desc = '[C]hange [D]irectory to [H]ome' })
-- Automatically navigate to config directory
vim.keymap.set('n', '<leader>cdn', '<cmd>cd ' .. vim.fn.stdpath 'config' .. '<cr>', { desc = '[C]hange [D]irectory to [N]eovim' })
-- Delete current buffer without closing window
vim.keymap.set('n', '<leader>bd', '<cmd>bp<bar>sp<bar>bn<bar>bd<cr>', { desc = '[B]uffer [D]elete' })