From 7eb56bbdb5f14b26ca8b69323186bca69c554c0c Mon Sep 17 00:00:00 2001 From: Chiel92 Date: Sat, 1 Dec 2012 11:18:53 +0100 Subject: [PATCH] With javascript, a selection can be made and formatted independently. --- README.markdown | 5 ++++- ftplugin/javascript.vim | 5 ++--- plugin/.autoformat.vim.swp | Bin 12288 -> 0 bytes 3 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 plugin/.autoformat.vim.swp diff --git a/README.markdown b/README.markdown index 894c195..c549a7b 100644 --- a/README.markdown +++ b/README.markdown @@ -1,2 +1,5 @@ vim-autoformat -============== \ No newline at end of file +============== + +html, css, javascript by vim-jsbeautify +python by autopep8 diff --git a/ftplugin/javascript.vim b/ftplugin/javascript.vim index d0b0105..5a5c7ac 100644 --- a/ftplugin/javascript.vim +++ b/ftplugin/javascript.vim @@ -1,8 +1,7 @@ -let &formatexpr="JsBeautify()" +let s:CliOptions = "-d" let s:bundleDir = fnamemodify(expand(""), ":h:h:h") -let g:jsbeautify_file = fnameescape(s:bundleDir."/js-beautify/beautify.js") +let &formatprg=s:bundleDir."/js-beautify/python/js-beautify -i ".s:CliOptions -let g:jsbeautify = {'indent_size': 4, 'indent_char': ' '} set expandtab set tabstop=4 set shiftwidth=4 diff --git a/plugin/.autoformat.vim.swp b/plugin/.autoformat.vim.swp deleted file mode 100644 index c74802aadc5f2dc7095715b42f7b6904a36d74e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2O==WD6vrzfLcrkH#)XTr1dqvSL>U*Z!fW``Gw-{8RhtF&`vhh_`*+Tk$Z5pM^2}_9khpH4p z1c<;?0*%ka!#TEe@9yHQ=qA5*^~KZ_3LpYRfCvx)B0vO)01+SpMBr=@@bwJ)g-bez z!k_B0vO)01+SpM1Tko0U|&IhyW2dBLrm1*qw`vy+egR0K$I&-!3us z38hfWsBDfgK&_x|pe~?(VElK~SJY?JN7Q>%Tjz|hp=A&OB0vO)01+SpM1Tko0V44K z2tb);O__LIm5lS*L>j|Ky0qZ@P{U{*KZkdZ%|<&g_NLW{J1;%3*%hY^l%B&L@Td&8 zhz(at?LLk$W9{%}F;A)#LIVRn)DJaR@$KXg+CIJDj0X5MxQ`l)hvRDH6~sD)qnh(Q z7Ckzco#O@OAiTuvb*Z?|f#X=(0*{+41Iw6fc!sn3{Tg_k*E~#eyGyC9T8+@QvCf5X zwM;%nGHg~`Ng0fhMGe*^*s--GId;V6IT$07swfbH@RdlbCdNUWk?3+`Pn&|% z;)<~{<{<_2rPyDp31>S^CXEA8Hf`b3ODt@v5!gh!uD3K=l>&AfX~OC~gyyar>tGU# zD+Y^OgaP}=Y+Z5F3%@VwoRj%{e-+~kJBUTs&S zjlp0Y@OHb-_UC)Y<8xn_(+N+|`nQZXawuJ5b?r~*J#~{=(Ev9(9Kh~y@!D3(%EGm0 OG}x_Hxj#INj{OE0sb>KI