X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/890dc13c7c07cd913464383e72696845feac0f7b..861e84fc0bc97be8387e92ac2fc180599dc2b5a3:/ftplugin/markdown.vim?ds=inline diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index d7c3777..1078f3d 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -599,10 +599,16 @@ if !exists('*s:EditUrlUnderCursor') endif endif if l:url != '' + let l:ext = '' if get(g:, 'vim_markdown_no_extensions_in_markdown', 0) - let l:url .= '.md' + " use another file extension if preferred + if exists('g:vim_markdown_auto_extension_ext') + let l:ext = '.'.g:vim_markdown_auto_extension_ext + else + let l:ext = '.md' + endif endif - let l:url = fnamemodify(expand('%:h').'/'.l:url, ':.') + let l:url = fnameescape(fnamemodify(expand('%:h').'/'.l:url.l:ext, ':.')) execute 'edit' l:url endif if l:anchor != ''