Skip to content

Commit 8e0ebad

Browse files
committed
Hacked gx
1 parent 690e8e9 commit 8e0ebad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ftplugin/markdown.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ nnoremap <buffer> <expr> <CR> empty(links.IsLink())
106106
\ ? '<ScriptCmd>SetLinkOpFunc()<CR>g@iw'
107107
\ : '<ScriptCmd>links.OpenLink()<CR>'
108108
109-
nnoremap <buffer> <expr> <s-CR> empty(links.IsLink())
109+
noremap <buffer> <expr> gx empty(links.IsLink())
110+
\ ? '<cmd>echo "Invalid URL"<cr>'
111+
\ : '<ScriptCmd>links.OpenLink()<CR>'
112+
113+
nmap <buffer> <expr> <s-CR> empty(links.IsLink())
110114
\ ? '<s-CR>'
111115
\ : '<ScriptCmd>links.OpenLink(true)<CR>'
112116

0 commit comments

Comments
 (0)