diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-06-17 13:04:54 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-06-17 13:04:54 +1200 |
commit | 33aea3b41996356fd3a3974729545e8a895be197 (patch) | |
tree | dabb8dc51eea7bf24d1398c8d86db4a9d6b0938c | |
parent | Nitpick: fix indenting in vimrc (diff) | |
download | dotfiles-33aea3b41996356fd3a3974729545e8a895be197.tar.gz dotfiles-33aea3b41996356fd3a3974729545e8a895be197.zip |
Add a function to make quick links
-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> + |