Fork and customize config
This commit is contained in:
parent
4a37a0a9b1
commit
e137556250
6 changed files with 155 additions and 35 deletions
20
lua/custom/plugins/reveal.lua
Normal file
20
lua/custom/plugins/reveal.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- 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 {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue