mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-27 05:41:45 +00:00
Compare commits
3 Commits
db78ba8f77
...
7f9256b56c
Author | SHA1 | Date | |
---|---|---|---|
7f9256b56c | |||
f219313212 | |||
0cbd3722da |
9
lua/custom/plugins/autosession.lua
Normal file
9
lua/custom/plugins/autosession.lua
Normal 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,
|
||||||
|
}
|
4
lua/custom/plugins/lastplace.lua
Normal file
4
lua/custom/plugins/lastplace.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-- Plugin to intelligently reopen files at last edit position
|
||||||
|
return {
|
||||||
|
'farmergreg/vim-lastplace',
|
||||||
|
}
|
@ -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' })
|
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
|
-- 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' })
|
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
|
-- 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' })
|
vim.keymap.set('n', '<leader>bd', '<cmd>bp<bar>sp<bar>bn<bar>bd<cr>', { desc = '[B]uffer [D]elete' })
|
||||||
|
Loading…
Reference in New Issue
Block a user