Skip to content

Commit 874c686

Browse files
authored
Merge pull request #97 from malcolmr/master
Improve jsbeautify tests
2 parents 295acb2 + 3701231 commit 874c686

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

vroom/jsbeautify.vroom

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,34 @@ You can format any buffer with js-beautify specifying the formatter explicitly.
5454
}
5555
@end
5656

57-
# @TODO: fix default formatter for javascript
5857
Several filetypes will use the js-beautify formatter by default:
5958
javascript, json, html and css.
6059

60+
Note that javascript will currently be picked up by clang-format;
61+
here we specify js-beautify explicitly.
62+
# @TODO: fix default formatter for javascript
63+
6164
@clear
6265
% f();
6366

67+
:set filetype=javascript
68+
:FormatCode js-beautify
69+
! js-beautify -f - --type js 2>.*
70+
$ f();
71+
6472
:set filetype=json
6573
:FormatCode
66-
! js-beautify .*
74+
! js-beautify -f - --type js 2>.*
6775
$ f();
6876

6977
:set filetype=html
7078
:FormatCode
71-
! js-beautify .*
79+
! js-beautify -f - --type html 2>.*
7280
$ f();
7381

7482
:set filetype=css
7583
:FormatCode
76-
! js-beautify .*
84+
! js-beautify -f - --type css 2>.*
7785
$ f();
7886

7987
:set filetype=

0 commit comments

Comments
 (0)