annotate runtime/ftplugin/hog.vim @ 34658:224d4a792264 v9.1.0213

patch 9.1.0213: CI: MS-Windows fails in test_winfixbuf Commit: https://github.com/vim/vim/commit/aed6554b46bbba39bcb22e49cc731176cd75789b Author: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Thu Mar 28 09:48:34 2024 +0100 patch 9.1.0213: CI: MS-Windows fails in test_winfixbuf Problem: CI: MS-Windows fails in test_winfixbuf (after v9.1.208) Solution: Instead of skipping the test, write the file so it exists on disk, to verify that MS-Windows short filename expansion is successful. (Sean Dewar) related: #14286 Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Mar 2024 10:00:07 +0100
parents 3ba0f29ba1d1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7188
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim filetype plugin
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Language: hog (snort.conf)
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: . Victor Roemer, <vroemer@badsec.org>.
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " Last Change: Mar 1, 2013
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 if exists("b:did_ftplugin")
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 finish
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 endif
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 let b:did_ftplugin = 1
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 let s:undo_ftplugin = "setl fo< com< cms< def< inc<"
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 let s:cpo_save = &cpo
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 set cpo&vim
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 setlocal formatoptions=croq
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 setlocal comments=:#
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 setlocal commentstring=\c#\ %s
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 setlocal define=\c^\s\{-}var
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 setlocal include=\c^\s\{-}include
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 " Move around configurations
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 let s:hog_keyword_match = '\c^\s*\<\(preprocessor\\|config\\|output\\|include\\|ipvar\\|portvar\\|var\\|dynamicpreprocessor\\|' .
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 \ 'dynamicengine\\|dynamicdetection\\|activate\\|alert\\|drop\\|block\\|dynamic\\|log\\|pass\\|reject\\|sdrop\\|sblock\)\>'
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 exec "nnoremap <buffer><silent> ]] :call search('" . s:hog_keyword_match . "', 'W' )<CR>"
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 exec "nnoremap <buffer><silent> [[ :call search('" . s:hog_keyword_match . "', 'bW' )<CR>"
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 if exists("loaded_matchit")
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 let b:match_words =
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 \ '^\s*\<\%(preprocessor\|config\|output\|include\|ipvar\|portvar' .
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 \ '\|var\|dynamicpreprocessor\|dynamicengine\|dynamicdetection' .
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 \ '\|activate\|alert\|drop\|block\|dynamic\|log\|pass\|reject' .
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 \ '\|sdrop\|sblock\>\):$,\::\,:;'
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 let b:match_skip = 'r:\\.\{-}$\|^\s*#.\{-}$\|^\s*$'
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 endif
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 let &cpo = s:cpo_save
3ba0f29ba1d1 commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 unlet s:cpo_save