You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kickstart.nvim/lua/custom/plugins/reveal.lua

21 lines
461 B
Lua

-- RevealInFinder
-- ---------------------------------------------------------------------------
-- set this to leader-e
vim.cmd([[
function! s:RevealInFinder()
if filereadable(expand("%"))
let l:command = "open -R %"
elseif getftype(expand("%:p:h")) == "dir"
let l:command = "open %:p:h"
else
let l:command = "open ."
endif
execute ":silent! !" . l:command
redraw!
endfunction
command! Reveal call <SID>RevealInFinder()
]])
return {}