1" Vim filetype plugin 2" Language: hog (snort.conf) 3" Maintainer: . Victor Roemer, <[email protected]>. 4" Last Change: Mar 1, 2013 5 6if exists("b:did_ftplugin") 7 finish 8endif 9let b:did_ftplugin = 1 10 11let s:undo_ftplugin = "setl fo< com< cms< def< inc<" 12 13let s:cpo_save = &cpo 14set cpo&vim 15 16setlocal formatoptions=croq 17setlocal comments=:# 18setlocal commentstring=\c#\ %s 19setlocal define=\c^\s\{-}var 20setlocal include=\c^\s\{-}include 21 22" Move around configurations 23let s:hog_keyword_match = '\c^\s*\<\(preprocessor\\|config\\|output\\|include\\|ipvar\\|portvar\\|var\\|dynamicpreprocessor\\|' . 24 \ 'dynamicengine\\|dynamicdetection\\|activate\\|alert\\|drop\\|block\\|dynamic\\|log\\|pass\\|reject\\|sdrop\\|sblock\)\>' 25 26exec "nnoremap <buffer><silent> ]] :call search('" . s:hog_keyword_match . "', 'W' )<CR>" 27exec "nnoremap <buffer><silent> [[ :call search('" . s:hog_keyword_match . "', 'bW' )<CR>" 28 29if exists("loaded_matchit") 30 let b:match_words = 31 \ '^\s*\<\%(preprocessor\|config\|output\|include\|ipvar\|portvar' . 32 \ '\|var\|dynamicpreprocessor\|dynamicengine\|dynamicdetection' . 33 \ '\|activate\|alert\|drop\|block\|dynamic\|log\|pass\|reject' . 34 \ '\|sdrop\|sblock\>\):$,\::\,:;' 35 let b:match_skip = 'r:\\.\{-}$\|^\s*#.\{-}$\|^\s*$' 36endif 37 38let &cpo = s:cpo_save 39unlet s:cpo_save 40