Skip to content

Commit

Permalink
fold, jsbeautify
Browse files Browse the repository at this point in the history
  • Loading branch information
lovelock committed Aug 11, 2015
1 parent 4e413eb commit c67745d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ set t_ti= t_te=
set selection=inclusive
set selectmode=mouse,key

" folds automatically by indent level, also can create folds manually
augroup vimrc
au BufReadPre * setlocal foldmethod=indent
au BufWinEnter * if &fdm == 'indent' | setlocal foldmethod=manual | endif
augroup END

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Expand Down Expand Up @@ -576,4 +582,3 @@ function! <SID>BufcloseCloseIt()
execute("bdelete! ".l:currentBufNum)
endif
endfunction

9 changes: 9 additions & 0 deletions vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,15 @@ Bundle '2072/PHP-Indenting-for-VIm'
" for javascript
Bundle 'jelera/vim-javascript-syntax'
Bundle "pangloss/vim-javascript"
Bundle "maksimr/vim-jsbeautify"
Bundle "einars/js-beautify"
map <c-f> :call JsBeautify()<cr>
" or
autocmd FileType javascript noremap <buffer> <c-f> :call JsBeautify()<cr>
" for html
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr>
" for css or scss
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr>
let g:html_indent_inctags = "html,body,head,tbody"
let g:html_indent_script1 = "inc"
let g:html_indent_style1 = "inc"
Expand Down

0 comments on commit c67745d

Please sign in to comment.