diff options
Diffstat (limited to 'after/syntax')
-rwxr-xr-x[-rw-r--r--] | after/syntax/c.vim | 18 | ||||
l--------- | after/syntax/cpp.vim | 1 | ||||
-rwxr-xr-x | after/syntax/log.vim | 24 | ||||
-rwxr-xr-x | after/syntax/markdown.vim | 19 |
4 files changed, 61 insertions, 1 deletions
diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 72136f6..4c3b3f0 100644..100755 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim | |||
@@ -21,6 +21,24 @@ syntax match Comment "//.*" contains=Todo | |||
21 | syn clear cBlock | 21 | syn clear cBlock |
22 | syn region cBlock start=/{/ end=/}/ transparent | 22 | syn region cBlock start=/{/ end=/}/ transparent |
23 | 23 | ||
24 | |||
25 | " configure c.vim so that it automatically allows doxygen like comments | ||
26 | let g:load_doxygen_syntax=1 | ||
27 | |||
28 | |||
29 | set formatoptions+=j " Where it makes sense, remove a comment leader when joining lines. | ||
30 | set formatoptions+=1 " Don't break a line after a one-letter word. | ||
31 | |||
32 | |||
33 | |||
34 | " open a corresponding header file | ||
35 | nnorem <leader>gh :execute 'edit '.findfile(substitute(expand('%:t'),'\.[ch]$','.h',''))<CR> | ||
36 | |||
37 | if filereadable("/usr/bin/vendor_perl/ack") | ||
38 | autocmd FileType c,cpp set grepprg=/usr/bin/vendor_perl/ack\ --type=cc\ --nogroup\ --column\ $* | ||
39 | autocmd FileType c,cpp set grepformat=%f:%l:%c:%m | ||
40 | endif | ||
41 | |||
24 | " multiple single line comments in a row " broken! | 42 | " multiple single line comments in a row " broken! |
25 | " syn region myCComment start="/\*" end="\*/" fold keepend transparent | 43 | " syn region myCComment start="/\*" end="\*/" fold keepend transparent |
26 | 44 | ||
diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim deleted file mode 120000 index 64e3fd4..0000000 --- a/after/syntax/cpp.vim +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | c.vim \ No newline at end of file | ||
diff --git a/after/syntax/log.vim b/after/syntax/log.vim new file mode 100755 index 0000000..99b677f --- /dev/null +++ b/after/syntax/log.vim | |||
@@ -0,0 +1,24 @@ | |||
1 | |||
2 | |||
3 | hi link Info NonText | ||
4 | hi link Pass DiffAdd | ||
5 | |||
6 | syn match ERROR /TEST-UNEXPECTED-FAIL/ | ||
7 | syn match NonText /^\[[^\]]*\]/ | ||
8 | |||
9 | syn match NonText /^ *\d\{1,2\}:\d\{1,2\}[.:]\d\{1,2\}[:0-9]*/ | ||
10 | syn match ErrorMsg / ERROR / | ||
11 | syn match ErrorMsg / FAIL / | ||
12 | syn match Error / WARNING / | ||
13 | syn match Info / INFO / fold | ||
14 | syn match Pass / PASS / fold | ||
15 | |||
16 | |||
17 | silent! lvimgrep /\(ERROR\|WARNING\|FAIL\)/ % | ||
18 | lopen 12 | ||
19 | |||
20 | |||
21 | |||
22 | " setlocal foldexpr=getline(v:lnum)=~'INFO' | ||
23 | " setlocal foldmethod=expr | ||
24 | " setlocal foldenable | ||
diff --git a/after/syntax/markdown.vim b/after/syntax/markdown.vim new file mode 100755 index 0000000..e012ee4 --- /dev/null +++ b/after/syntax/markdown.vim | |||
@@ -0,0 +1,19 @@ | |||
1 | " Custom conceal | ||
2 | " syntax region todolist start="^\s*[\+-\*x ]" end="\s" contained keepend | ||
3 | |||
4 | syntax match markdownConceal "\[\ \]" conceal cchar= | ||
5 | syntax match markdownConceal "\[x\]" conceal cchar= | ||
6 | syntax match markdownConceal "\[v\]" conceal cchar= | ||
7 | syntax match markdownConceal "*" conceal cchar= | ||
8 | syntax match markdownConceal "-" conceal cchar= | ||
9 | syntax match markdownConceal "+" conceal cchar= | ||
10 | |||
11 | syntax region | ||
12 | \ markdownItemization | ||
13 | \ start="^\s*\(\[ \]\|[\+\-\*x]\)\s" | ||
14 | \ end="\s" | ||
15 | \ contains=markdownConceal | ||
16 | |||
17 | |||
18 | hi def link markdownConceal Todo | ||
19 | hi! link Conceal Text | ||