" Run `tidy -errors -quiet` over buffer nnoremap \ c \ :write !tidy -errors -quiet " Filter buffer through `tidy` nnoremap \ t \ :%!tidy -quiet " 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 " 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 endfunction " Mapping for the function above nnoremap \ r \ :call UrlLink() " Unload this filetype plugin let b:undo_user_ftplugin \ = 'silent! nunmap c' \ . '|silent! nunmap t' \ . '|silent! nunmap r'