diff options
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | runtime/lua/vim/filetype/detect.lua | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 74ab7d8260..6cfe6e6c35 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1469,6 +1469,7 @@ local filename = { ['.gprc'] = 'gp', ['/.gnupg/gpg.conf'] = 'gpg', ['/.gnupg/options'] = 'gpg', + ['Jenkinsfile'] = 'groovy', ['/var/backups/gshadow.bak'] = 'group', ['/etc/gshadow'] = 'group', ['/etc/group-'] = 'group', diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua index d1eabadc4a..94114ae7c3 100644 --- a/runtime/lua/vim/filetype/detect.lua +++ b/runtime/lua/vim/filetype/detect.lua @@ -1550,8 +1550,15 @@ local patterns_text = { ['^SNNS pattern definition file'] = 'snnspat', ['^SNNS result file'] = 'snnsres', ['^%%.-[Vv]irata'] = { 'virata', { start_lnum = 1, end_lnum = 5 } }, - ['[0-9:%.]* *execve%('] = 'strace', - ['^__libc_start_main'] = 'strace', + function(lines) + if + -- inaccurate fast match first, then use accurate slow match + (lines[1]:find('execve%(') and lines[1]:find('^[0-9:%.]* *execve%(')) + or lines[1]:find('^__libc_start_main') + then + return 'strace' + end + end, -- VSE JCL ['^\\* $$ JOB\\>'] = { 'vsejcl', { vim_regex = true } }, ['^// *JOB\\>'] = { 'vsejcl', { vim_regex = true } }, |