diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index 8d6ea65..928d1f3 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -32,7 +32,6 @@ let s:VERSION = '4.0.6' let s:config_file = expand("$HOME/.wakatime.cfg") let s:data_file = expand("$HOME/.wakatime.data") let s:config_file_already_setup = 0 - let s:ignoredFiles = ["", "-MiniBufExplorer-", "--NO NAME--"] let s:local_cache_expire = 10 let s:last_heartbeat = [0, 0, ''] @@ -110,13 +109,6 @@ let s:VERSION = '4.0.6' return substitute(shellescape(a:arg), '!', '\\!', '') endfunction - function! s:ListContains(list, el) - if index(a:list, a:el) >= 0 - return 1 - endif - return 0 - endfunction - function! s:JoinArgs(args) let safeArgs = [] for arg in a:args @@ -193,7 +185,7 @@ let s:VERSION = '4.0.6' let file = s:GetCurrentFile() let now = localtime() let last = s:GetLastHeartbeat() - if !empty(file) && !s:ListContains(s:ignoredFiles, file) + if !empty(file) && file !~ "-MiniBufExplorer-" && file !~ "--NO NAME--" && file !~ "^term:" if a:is_write || s:EnoughTimePassed(now, last) || file != last[2] call s:SendHeartbeat(file, now, a:is_write, last) else