Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autoload/phpfmt/fmt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function! phpfmt#fmt#format() abort "{{{
endif
let l:tmpname = g:phpfmt_tmp_dir . expand('%')
else
let l:tmpname = tempname()
let l:tmpname = tempname() . '.' . expand('%:e')
endif
call writefile(getline(1, '$'), l:tmpname)

Expand Down
10 changes: 9 additions & 1 deletion plugin/phpfmt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ if !exists('g:phpfmt_command')
endif

if !exists('g:phpfmt_standard')
let g:phpfmt_options = '--standard=PSR2 --encoding=utf-8'
let g:phpfmt_standard = 'PSR2'
else
let phpmfm_standard_is_specified = 1
endif

if !exists('g:phpfmt_options')
let g:phpfmt_options = '--standard=' . g:phpfmt_standard . ' --encoding=utf-8'
else
if exists('phpmfm_standard_is_specified')
let g:phpfmt_options = '--standard=' . g:phpfmt_standard . ' ' . g:phpfmt_options
endif
endif

if !exists("g:phpfmt_experimental")
Expand Down