From 811f2c71d9bbbbd51c65ab2da2065566c84c6518 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 28 Jul 2024 20:45:31 +0200 Subject: [PATCH] change to base directory and home keymaps --- lua/keymaps.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index b94eeb4..93be8db 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -41,7 +41,9 @@ vim.keymap.set('v', 'pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' }) -- Populate CMD to prepare for change directory vim.keymap.set('n', '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', 'cdh', 'cd ' .. vim.g.base_dir .. '', { desc = '[C]hange [D]irectory to [H]ome' }) +vim.keymap.set('n', 'cdb', 'cd ' .. vim.g.base_dir .. '', { desc = '[C]hange [D]irectory to [B]ase directory' }) +-- Navigate to 'user home' directory +vim.keymap.set('n', 'cdh', 'cd ' .. vim.env.HOME .. '', { desc = '[C]hange [D]irectory to [H]ome' }) -- Automatically navigate to config directory vim.keymap.set('n', 'cdn', 'cd ' .. vim.fn.stdpath 'config' .. '', { desc = '[C]hange [D]irectory to [N]eovim' })