From 0cbd3722da18c9cabd408f120ad4169119f5a767 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Wed, 19 Jun 2024 19:46:09 +0200 Subject: [PATCH] keymap to automatically navigate to neovim config --- lua/keymaps.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index bac766f..b3712d2 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -41,6 +41,8 @@ vim.keymap.set('v', 'pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' }) 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' }) +-- Automatically navigate to config directory +vim.keymap.set('n', 'cdn', 'cd ' .. vim.fn.stdpath 'config' .. '', { desc = '[C]hange [D]irectory to [N]eovim' }) -- Delete current buffer without closing window vim.keymap.set('n', 'bd', 'bpspbnbd', { desc = '[B]uffer [D]elete' })