Skip to content

Commit

Permalink
#116 try an alternative method of opening links with mkdx#gf
Browse files Browse the repository at this point in the history
  • Loading branch information
SidOfc committed Aug 25, 2020
1 parent fdc00bb commit 90711bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/mkdx.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,8 @@ fun! mkdx#gf(...)
let is_img = match(get(split(destination, '\.'), -1, ''), g:mkdx#settings.image_extension_pattern) > -1

if !do_int && (do_ext || destination =~? '^http' || is_img)
silent! call system('open ' . destination)
let cmd = executable('open') ? 'open' : (executable('xdg-open') ? 'xdg-open' : '')
silent! exec '!' . cmd . ' ' . destination
else
if get(s:util.hlAtCursor(), 0, '') ==? 'mkdxLink'
normal! gf
Expand Down

0 comments on commit 90711bb

Please sign in to comment.