Skip to content

Commit

Permalink
#vim astyle for java
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Braun committed Jan 19, 2014
1 parent 8e1dbf6 commit c61bf80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vimrc
Expand Up @@ -199,6 +199,7 @@ endfunction
au Filetype java set makeprg=javac\ %
au Filetype java set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
au Filetype java set foldmethod=syntax
au filetype java set formatprg=astyle\ --style=java
au FileType java map <F5> <CR>:make<CR>
au FileType java imap <F5> <esc><F5>a
au FileType java map <F6> :!echo %\|awk -F. '{print $1}'\|xargs java<CR>
Expand Down Expand Up @@ -289,6 +290,7 @@ endfunction
" autoformat
let g:formatprg_args_expr_c = '"--mode=c --style=stroustrup -pcH".(&expandtab ? "s".&shiftwidth : "t")'
let g:formatprg_args_expr_cpp = '"--mode=c --style=stroustrup -pcH".(&expandtab ? "s".&shiftwidth : "t")'
let g:formatprg_args_expr_java = '"--mode=java --style=java -pcH".(&expandtab ? "s".&shiftwidth : "t")'

" Colorized
set background=dark
Expand Down

0 comments on commit c61bf80

Please sign in to comment.