blob: 3bd1dbdf1fe68b5c0bff9c0edebf2da576ce8ff8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
" Run `tidy -errors -quiet` for the current buffer
nnoremap <LocalLeader>c :write !tidy -errors -quiet -utf8<CR>
" Make a bare URL into a link to itself
function! s:UrlLink()
" 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
nnoremap <silent> <LocalLeader>r :<C-U>call <SID>UrlLink()<CR>
|