diff options
Diffstat (limited to 'vim')
-rw-r--r-- | vim/after/ftplugin/html.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim new file mode 100644 index 00000000..c7bdfc7d --- /dev/null +++ b/vim/after/ftplugin/html.vim @@ -0,0 +1,9 @@ +" Make a bare URL into a link to itself +function! UrlLink() + normal ByE + execute "normal i<a href=\"\<C-R>0\">\<Esc>" + normal E + execute "normal a</a>\<Esc>" +endfunction +nnoremap <silent> <leader>r :<C-U>call UrlLink()<CR> + |