From e3c5974adf25002ea490719a3391d790bd3a3353 Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:30:54 -0500 Subject: feat(dir): open cwd with `1-` #40948 --- runtime/plugin/dir.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/plugin/dir.lua') diff --git a/runtime/plugin/dir.lua b/runtime/plugin/dir.lua index cf01290c31..e39fde8ab8 100644 --- a/runtime/plugin/dir.lua +++ b/runtime/plugin/dir.lua @@ -11,6 +11,10 @@ vim.keymap.set('n', '(nvim-dir-open)', function() end, { silent = true, desc = 'Open directory entry' }) vim.keymap.set('n', '(nvim-dir-up)', function() + if vim.v.count == 1 then + api.nvim_cmd({ cmd = 'edit', args = { '.' }, magic = { file = false, bar = false } }, {}) + return + end local dir = require('nvim.dir') for _ = 1, vim.v.count1 do dir._open_parent() -- cgit