diff options
Diffstat (limited to 'after/syntax')
-rw-r--r-- | after/syntax/c.vim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 49e96f0..72136f6 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim | |||
@@ -1,11 +1,13 @@ | |||
1 | setlocal number | ||
2 | setlocal foldenable | 1 | setlocal foldenable |
3 | setlocal foldmethod=expr | 2 | setlocal foldmethod=expr |
4 | setlocal foldcolumn=0 | 3 | " setlocal foldcolumn=0 |
5 | 4 | ||
6 | " setlocal foldexpr=get(synstack(v:lnum,1),0)==hlID('cComment') | 5 | " setlocal foldexpr=get(synstack(v:lnum,1),0)==hlID('cComment') |
7 | setlocal foldexpr=index([0,hlID('cComment'),hlID('Comment')],get(synstack(v:lnum,1),0)) | 6 | " setlocal foldexpr=len(filter(synstack(v:lnum,indent(v:lnum)+1),'index([hlID(\"cComment\"),hlID(\"cCommentStart\")],v:val)!=-1'))>0 |
8 | 7 | " setlocal foldtext=printf('%*s%.'.eval(&textwidth-indent(v:foldstart)).'S',indent(v:foldstart),'',substitute(substitute(substitute(join(getline(v:foldstart,v:foldend)),'\\s\\s\\+\\\|\[\*\/\]','\ ','g'),'\^\\s\\+','','g'),\ '\\s\\s\\+',\ '\ ',\ 'g')) | |
8 | " setlocal foldexpr=index(get(synstack(v:lnum,1),0),hlID('cComment'))>0 | ||
9 | " setlocal foldexpr=index(synstack(v:lnum,indent(v:lnum)+1),hlID('cComment'))>0 | ||
10 | " setlocal signcolumn=no | ||
9 | " syntax match cType "struct\s+[A-Za-z0-9_]+\>" | 11 | " syntax match cType "struct\s+[A-Za-z0-9_]+\>" |
10 | " syn clear cStructure | 12 | " syn clear cStructure |
11 | " highlight! link defines Special | 13 | " highlight! link defines Special |
@@ -23,7 +25,6 @@ syn region cBlock start=/{/ end=/}/ transparent | |||
23 | " syn region myCComment start="/\*" end="\*/" fold keepend transparent | 25 | " syn region myCComment start="/\*" end="\*/" fold keepend transparent |
24 | 26 | ||
25 | 27 | ||
26 | |||
27 | " let b:current_syntax = "c" | 28 | " let b:current_syntax = "c" |
28 | " let g:polyglot_disabled = ['c/c++'] | 29 | " let g:polyglot_disabled = ['c/c++'] |
29 | " unlet s:ft | 30 | " unlet s:ft |