aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/html.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-10 01:55:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-10 01:56:49 +1200
commitf36ef6745c3c96914eb7be228125c1d53bf70287 (patch)
treea42fc40eafc296b522071d60d754eb3c83ffece7 /vim/after/ftplugin/html.vim
parent7e79ea883a34099d24ad02a5709ee3f8e759606f (diff)
downloaddotfiles-f36ef6745c3c96914eb7be228125c1d53bf70287.tar.gz
dotfiles-f36ef6745c3c96914eb7be228125c1d53bf70287.zip
Overhaul after/ftplugin
Use .= operator to append to b:undo_ftplugin, as we're requiring Vim 7.0 or later everywhere here anyway. Also remove &compatible where we don't need line breaks.
Diffstat (limited to 'vim/after/ftplugin/html.vim')
-rw-r--r--vim/after/ftplugin/html.vim15
1 files changed, 5 insertions, 10 deletions
diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim
index d0625fb7..2faea4f5 100644
--- a/vim/after/ftplugin/html.vim
+++ b/vim/after/ftplugin/html.vim
@@ -1,16 +1,13 @@
" Extra configuration for HTML files
-if &filetype != 'html' || &compatible || v:version < 700
+if &filetype !=# 'html' || v:version < 700 || &compatible
finish
endif
" Use tidy(1) for checking and program formatting
compiler tidy
setlocal equalprg=tidy\ -quiet
-let b:undo_ftplugin = b:undo_ftplugin
- \ . '|unlet b:current_compiler'
- \ . '|setlocal equalprg<'
- \ . '|setlocal errorformat<'
- \ . '|setlocal makeprg<'
+let b:undo_ftplugin .= '|unlet b:current_compiler'
+ \ . '|setlocal equalprg< errorformat< makeprg<'
" Set up hooks for timestamp updating
augroup html_timestamp
@@ -19,8 +16,7 @@ augroup html_timestamp
\| call html#TimestampUpdate()
\|endif
augroup END
-let b:undo_ftplugin = b:undo_ftplugin
- \ . '|autocmd! html_timestamp BufWritePre <buffer>'
+let b:undo_ftplugin .= '|autocmd! html_timestamp BufWritePre <buffer>'
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_html_maps')
@@ -30,5 +26,4 @@ endif
" Set mappings
nnoremap <buffer> <LocalLeader>r
\ :<C-U>call html#UrlLink()<CR>
-let b:undo_ftplugin = b:undo_ftplugin
- \ . '|nunmap <buffer> <LocalLeader>r'
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>r'