From bc9757916ed09763d96283ee62dbed58bd713a11 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 6 Oct 2020 18:54:19 +0200 Subject: Add all vim filetypes --- ftplugin/hog.vim | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 ftplugin/hog.vim (limited to 'ftplugin/hog.vim') diff --git a/ftplugin/hog.vim b/ftplugin/hog.vim new file mode 100644 index 00000000..b0541a39 --- /dev/null +++ b/ftplugin/hog.vim @@ -0,0 +1,43 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hog') == -1 + +" Vim filetype plugin +" Language: hog (snort.conf) +" Maintainer: . Victor Roemer, . +" Last Change: Mar 1, 2013 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:undo_ftplugin = "setl fo< com< cms< def< inc<" + +let s:cpo_save = &cpo +set cpo&vim + +setlocal formatoptions=croq +setlocal comments=:# +setlocal commentstring=\c#\ %s +setlocal define=\c^\s\{-}var +setlocal include=\c^\s\{-}include + +" Move around configurations +let s:hog_keyword_match = '\c^\s*\<\(preprocessor\\|config\\|output\\|include\\|ipvar\\|portvar\\|var\\|dynamicpreprocessor\\|' . + \ 'dynamicengine\\|dynamicdetection\\|activate\\|alert\\|drop\\|block\\|dynamic\\|log\\|pass\\|reject\\|sdrop\\|sblock\)\>' + +exec "nnoremap ]] :call search('" . s:hog_keyword_match . "', 'W' )" +exec "nnoremap [[ :call search('" . s:hog_keyword_match . "', 'bW' )" + +if exists("loaded_matchit") + let b:match_words = + \ '^\s*\<\%(preprocessor\|config\|output\|include\|ipvar\|portvar' . + \ '\|var\|dynamicpreprocessor\|dynamicengine\|dynamicdetection' . + \ '\|activate\|alert\|drop\|block\|dynamic\|log\|pass\|reject' . + \ '\|sdrop\|sblock\>\):$,\::\,:;' + let b:match_skip = 'r:\\.\{-}$\|^\s*#.\{-}$\|^\s*$' +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif -- cgit v1.2.3