Mercurial > vim
comparison runtime/ftplugin/hog.vim @ 7188:3ba0f29ba1d1
commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 1 16:49:04 2015 +0100
Updated runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 01 Nov 2015 17:00:05 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
7187:02e493756808 | 7188:3ba0f29ba1d1 |
---|---|
1 " Vim filetype plugin | |
2 " Language: hog (snort.conf) | |
3 " Maintainer: . Victor Roemer, <vroemer@badsec.org>. | |
4 " Last Change: Mar 1, 2013 | |
5 | |
6 if exists("b:did_ftplugin") | |
7 finish | |
8 endif | |
9 let b:did_ftplugin = 1 | |
10 | |
11 let s:undo_ftplugin = "setl fo< com< cms< def< inc<" | |
12 | |
13 let s:cpo_save = &cpo | |
14 set cpo&vim | |
15 | |
16 setlocal formatoptions=croq | |
17 setlocal comments=:# | |
18 setlocal commentstring=\c#\ %s | |
19 setlocal define=\c^\s\{-}var | |
20 setlocal include=\c^\s\{-}include | |
21 | |
22 " Move around configurations | |
23 let 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 | |
26 exec "nnoremap <buffer><silent> ]] :call search('" . s:hog_keyword_match . "', 'W' )<CR>" | |
27 exec "nnoremap <buffer><silent> [[ :call search('" . s:hog_keyword_match . "', 'bW' )<CR>" | |
28 | |
29 if 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*$' | |
36 endif | |
37 | |
38 let &cpo = s:cpo_save | |
39 unlet s:cpo_save |