blob: b5c387fb752fa35fdfb07a64650d5bb8d33b208c (
plain) (
tree)
|
|
" Don't load if the buffer is not actually HTML (e.g. Markdown)
if &filetype !=# 'html'
finish
endif
" Use tidy(1) for checking and program formatting
compiler tidy
setlocal equalprg=tidy\ -quiet
let b:undo_ftplugin .= '|unlet b:current_compiler'
\ . '|setlocal equalprg< errorformat< makeprg<'
" Set up hooks for timestamp updating
augroup html_timestamp
autocmd BufWritePre <buffer>
\ if exists('b:html_timestamp_check')
\| call html#TimestampUpdate()
\|endif
augroup END
let b:undo_ftplugin .= '|execute ''autocmd! html_timestamp'''
\ . '|augroup! html_timestamp'
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_html_maps')
finish
endif
" Transform URLs to HTML anchors
nnoremap <buffer> <LocalLeader>r
\ :<C-U>call html#UrlLink()<CR>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>r'
|