blob: f46b323f46d255664086ea9d8f66146d6e02c24e (
plain) (
tree)
|
|
" Make a bare URL into a link to itself
function! html#UrlLink() abort
" Yank this whole whitespace-separated word
normal! yiW
" Open a link tag
normal! i<a href="">
" Paste the URL into the quotes
normal! hP
" Move to the end of the link text URL
normal! E
" Close the link tag
normal! a</a>
endfunction
|