With javascript, a selection can be made and formatted independently.

This commit is contained in:
Chiel92 2012-12-01 11:18:53 +01:00
parent 898c6e4ac7
commit 7eb56bbdb5
3 changed files with 6 additions and 4 deletions

View File

@ -1,2 +1,5 @@
vim-autoformat
==============
html, css, javascript by vim-jsbeautify
python by autopep8

View File

@ -1,8 +1,7 @@
let &formatexpr="JsBeautify()"
let s:CliOptions = "-d"
let s:bundleDir = fnamemodify(expand("<sfile>"), ":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

Binary file not shown.