neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

hog.vim (1454B)


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