blob: c756eb8096ceab45c8c6e51e7848a6dee6238be2 (
plain) (
tree)
|
|
" Run `tidy -errors -quiet` over buffer
nnoremap <buffer> <silent> <LocalLeader>c
\ :write !tidy -errors -quiet<CR>
" Filter buffer through `tidy`
nnoremap <buffer> <silent> <LocalLeader>t
\ :%!tidy -quiet<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 <buffer> <silent> <LocalLeader>r
\ :<C-U>call <SID>UrlLink()<CR>
|