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

View file

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