preservim / vim-markdown

Markdown Vim Mode
4.68k stars 521 forks source link

make Markdown_EditUrlUnderCursor fall back to builtin gf #566

Closed ferdinandyb closed 2 years ago

ferdinandyb commented 2 years ago

This is to allow for NOT using ge, rather just stick with the built-in gf for editing files, with a mapping such as this:

autocmd FileType markdown nmap <buffer>gf <Plug>Markdown_EditUrlUnderCursor

Why edit if it exists:

:h gf

If you do want to edit a new file, use: > :e To make gf always work like that: > :map gf :e

Since Markdown_EditUrlUnderCursor behaves this way already going with the edit always is a more logical fallback.