Skip to content

Commit d7464be

Browse files
committed
Updated runtime files.
1 parent 7314efd commit d7464be

5 files changed

Lines changed: 315 additions & 346 deletions

File tree

runtime/doc/pi_netrw.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*pi_netrw.txt* For Vim version 7.4. Last change: 2015 Oct 30
1+
*pi_netrw.txt* For Vim version 7.4. Last change: 2015 Oct 31
22

33
------------------------------------------------
44
NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -3438,7 +3438,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
34383438
You probably want netrw running as in a side window. If so, you
34393439
will likely find that ":[N]Lexplore" does what you want. The
34403440
optional "[N]" allows you to select the quantity of columns you
3441-
wish the Lexplorer window to start with (see |g:netrw_winsize|
3441+
wish the |:Lexplore|r window to start with (see |g:netrw_winsize|
34423442
for how this parameter works).
34433443

34443444
Previous solution:

runtime/doc/todo.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 7.4. Last change: 2015 Oct 30
1+
*todo.txt* For Vim version 7.4. Last change: 2015 Oct 31
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -222,6 +222,9 @@ Is this right?
222222
Patch to have CTRL-A and CTRL-X update the '[ and '] marks.
223223
(Yukihiro Nakadaira, 2015 Aug 23)
224224

225+
On MS-Windows viminfo file is always given the hidden attribute? (raulnac,
226+
2015 Oct 30)
227+
225228
Patch to make getregtype() return the right size for non-linux systems.
226229
(Yasuhiro Matsumoto, 2014 Jul 8)
227230
Breaks test_eval. Inefficient, can we only compute y_width when needed?

runtime/ftplugin/hog.vim

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
" Vim filetype plugin
2+
" Language: hog (snort.conf)
3+
" Maintainer: . Victor Roemer, <[email protected]>.
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

runtime/indent/hog.vim

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
" Vim indent file
2+
" Language: hog (Snort.conf)
3+
" Maintainer: Victor Roemer, <[email protected]>
4+
" Last Change: Mar 7, 2013
5+
6+
" Only load this indent file when no other was loaded.
7+
if exists("b:did_indent")
8+
finish
9+
endif
10+
let b:did_indent = 1
11+
let b:undo_indent = 'setlocal smartindent< indentexpr< indentkeys<'
12+
13+
setlocal nosmartindent
14+
setlocal indentexpr=GetHogIndent()
15+
setlocal indentkeys+=!^F,o,O,0#
16+
17+
" Only define the function once.
18+
if exists("*GetHogIndent")
19+
finish
20+
endif
21+
22+
let s:cpo_save = &cpo
23+
set cpo&vim
24+
25+
let s:syn_blocks = '\<SnortRuleTypeBody\>'
26+
27+
function s:IsInBlock(lnum)
28+
return synIDattr(synID(a:lnum, 1, 1), 'name') =~ s:syn_blocks
29+
endfunction
30+
31+
function GetHogIndent()
32+
let prevlnum = prevnonblank(v:lnum-1)
33+
34+
" Comment blocks have identical indent
35+
if getline(v:lnum) =~ '^\s*#' && getline(prevlnum) =~ '^\s*#'
36+
return indent(prevlnum)
37+
endif
38+
39+
" Ignore comment lines when calculating indent
40+
while getline(prevlnum) =~ '^\s*#'
41+
let prevlnum = prevnonblank(prevlnum-1)
42+
if !prevlnum
43+
return previndent
44+
endif
45+
endwhile
46+
47+
" Continuation of a line that wasn't indented
48+
let prevline = getline(prevlnum)
49+
if prevline =~ '^\k\+.*\\\s*$'
50+
return &sw
51+
endif
52+
53+
" Continuation of a line that was indented
54+
if prevline =~ '\k\+.*\\\s*$'
55+
return indent(prevlnum)
56+
endif
57+
58+
" Indent the next line if previous line contained a start of a block
59+
" definition ('{' or '(').
60+
if prevline =~ '^\k\+[^#]*{}\@!\s*$' " TODO || prevline =~ '^\k\+[^#]*()\@!\s*$'
61+
return &sw
62+
endif
63+
64+
" Match inside of a block
65+
if s:IsInBlock(v:lnum)
66+
if prevline =~ "^\k\+.*$"
67+
return &sw
68+
else
69+
return indent(prevlnum)
70+
endif
71+
endif
72+
73+
return 0
74+
endfunction
75+
76+
let &cpo = s:cpo_save
77+
unlet s:cpo_save

0 commit comments

Comments
 (0)