diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-04 08:45:38 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-04 08:45:38 +1300 |
commit | cebbf704f7e3048624bddb2e96eaa1db5fe9ef16 (patch) | |
tree | f6caa1ed0d681ffe925c2c7dd46cc9cec00081be /vim/autoload | |
parent | Remove line squeezing function for mail.vim (diff) | |
download | dotfiles-cebbf704f7e3048624bddb2e96eaa1db5fe9ef16.tar.gz dotfiles-cebbf704f7e3048624bddb2e96eaa1db5fe9ef16.zip |
Unseat tidy(1) as HTML 'equalprg'
Instead, remap \= specifically to use tidy(1) to reformat the whole
buffer.
Diffstat (limited to 'vim/autoload')
-rw-r--r-- | vim/autoload/html.vim | 7 |
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 |