aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/html.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/autoload/html.vim')
-rw-r--r--vim/autoload/html.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/vim/autoload/html.vim b/vim/autoload/html.vim
new file mode 100644
index 00000000..f46b323f
--- /dev/null
+++ b/vim/autoload/html.vim
@@ -0,0 +1,15 @@
+" 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