21 lines
461 B
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 {}
|