Skip to content

Commit

Permalink
Added: Indent fix scripts.
Browse files Browse the repository at this point in the history
Copied from Jakob. Thx!
  • Loading branch information
tobyS committed Jan 20, 2013
1 parent da41bbb commit 94cf328
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .vim/after/indent/javascript.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
" !! THIS FILE NEEDS TO BE IN THE "after" DIRECTORY BECAUSE IT IS OVERRIDDEN BY
" !! SYSTEM DEFAULT FILES OTHERWISE

" Disabling language based indentation rules
" The ending space is neccessary
setlocal indentexpr=

" Disable cindent as it somehow disturbs the correct js indentation
setlocal nocindent

" Enable indentation copy and smart indentation after c-style blocks instead
setlocal autoindent
setlocal smartindent
16 changes: 16 additions & 0 deletions .vim/after/indent/php.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
" !! THIS FILE NEEDS TO BE IN THE "after" DIRECTORY BECAUSE IT IS OVERRIDDEN BY
" !! SYSTEM DEFAULT FILES OTHERWISE

" Disabling language based indentation rules
" The ending space is neccessary
setlocal indentexpr=

" Enable indentation copy and smart indentation after c-style blocks instead
setlocal autoindent
setlocal smartindent

" Unfortunately the default indent file for PHP sets the formatoption ``w``,
" which adds a trailing whitespace after every line during rewrap, to indicate
" the continuation of a paragraph. Who the fuck came up with this idea?. We
" need to disable it here, as no other place has the priority to disable it :(
setlocal formatoptions-=w

0 comments on commit 94cf328

Please sign in to comment.