X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/bf9cf6524bf5534430ca7145eeada968c9e96e03..ab8ecf0bc73a792c60ad7a8a303290ccf89aa4e5:/ftplugin/markdown.vim diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index bf28d5e..21c9442 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -582,7 +582,14 @@ if !exists("*s:EditUrlUnderCursor") function s:EditUrlUnderCursor() let l:url = s:Markdown_GetUrlForPosition(line('.'), col('.')) if l:url != '' - execute 'edit' l:url + if get(g:, 'vim_markdown_autowrite', 0) + write + endif + if get(g:, 'vim_markdown_no_extensions_in_markdown', 0) + execute 'edit' fnamemodify(expand('%:~'), ':p:h').'/'.l:url.'.md' + else + execute 'edit' l:url + endif else echomsg 'The cursor is not on a link.' endif