feat(dir): open cwd with 1- #40948

This commit is contained in:
Barrett Ruth
2026-07-27 17:30:54 -05:00
committed by GitHub
parent fbcb7a056c
commit e3c5974adf
3 changed files with 15 additions and 11 deletions

View File

@@ -11,6 +11,10 @@ vim.keymap.set('n', '<Plug>(nvim-dir-open)', function()
end, { silent = true, desc = 'Open directory entry' })
vim.keymap.set('n', '<Plug>(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()