aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/html.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/autoload/html.vim')
-rw-r--r--vim/autoload/html.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/vim/autoload/html.vim b/vim/autoload/html.vim
index c3d99706..e0d47e47 100644
--- a/vim/autoload/html.vim
+++ b/vim/autoload/html.vim
@@ -14,6 +14,13 @@ function! html#UrlLink() abort
endfunction
+" Tidy the whole buffer
+function! html#TidyBuffer() abort
+ let l:view = winsaveview()
+ %!tidy -quiet
+ call winrestview(l:view)
+endfunction
+
" Update a timestamp
function! html#TimestampUpdate() abort
if !&modified