aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-30 00:36:55 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-30 00:36:55 +1200
commit2bcce63572e062f34527fbe42bb0f5756a08d8b8 (patch)
tree06aa6b6d3c0261a026574fba1b384661ff6f7bba /vim/autoload
parentRemove stray vim/autoload/vimrc.vim file (diff)
downloaddotfiles-2bcce63572e062f34527fbe42bb0f5756a08d8b8.tar.gz
dotfiles-2bcce63572e062f34527fbe42bb0f5756a08d8b8.zip
Refactor ftplugins into single files
Each thereby effectively becomes its own .vimrc for that type.
Diffstat (limited to 'vim/autoload')
-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