pass syntax of current file to wakatime-cli

This commit is contained in:
Alan Hamlett 2016-04-19 12:52:30 +02:00
parent d119ab22d0
commit 8f4f7b04f3
1 changed files with 7 additions and 0 deletions

View File

@ -135,6 +135,13 @@ let s:VERSION = '4.0.9'
if a:is_write
let cmd = cmd + ['--write']
endif
if &syntax != ''
let cmd = cmd + ['--alternate-language', &syntax]
else
if &filetype != ''
let cmd = cmd + ['--alternate-language', &filetype]
endif
endif
"let cmd = cmd + ['--verbose']
if has('win32') || has('win64')
exec 'silent !start /min cmd /c "' . s:JoinArgs(cmd) . '"'