btv.explorer
btv.explorer.actions.open()
btv.explorer.actions — the public, rebindable activation actions (current-buffer
wrappers over the stateless _open/_up). A user/plugin extends or rebinds the
explorer with an ordinary buffer-local map in a FileType btvdir autocmd, e.g.
btv.autocmd.create("FileType", { pattern = "btvdir", callback = function(a)
btv.keymap.set("n", "<C-j>", btv.explorer.actions.open, { buffer = a.buf })
end })
The default <CR>/-/<2-LeftMouse> maps (prelude/keymap.lua) are these too.
Defined in explorer.lua.
btv.explorer.actions.up()
No documentation comment in the prelude.
Defined in explorer.lua.
btv.explorer.enable()
btv.explorer.enable(): turn the explorer on. Registers the BufReadCmd handler that
claims directory opens — pattern = "*" deciding per path via args.isdir, so it
claims directories and lets every file read fall through to the editor’s default load
(netrw’s exact model). Idempotent. Calling it makes a BufReadCmd handler exist,
which is what tells the core to defer a :e dir so this handler gets the chance to
claim it (see Editor::should_defer_open). Called at the bottom of this file, so the
explorer is on by default; a config could turn it off by clearing the autocmd.
Defined in explorer.lua.