Debian Codegraph @

vim/indent/stp.vim

raw
1 " Vim indent file
2 " Language: SystemTap
3 " Maintainer: SystemTap Developers <[email protected]>
4 " Last Change: 2011 Aug 4
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
12 " SystemTap indenting works *mostly* the same as C, so this gets things pretty
13 " close. For 'real' SystemTap indenting, we would have to write a custom
14 " indentexpr function.
15
16 " indenting is similar to C, so start there...
17 setlocal cindent
18
19 " Statements don't require a ';', so don't indent following lines
20 setlocal cino=+0
21
22 " Known issues:
23 " - need to detect when following lines are a continuation of the previous
24 " statement, and indent appropriately.
25 " - one-liners with control flow try to indent the next line if there's no
26 " ';'. For example:
27 " if (my_condition) break
28 " do_work()
29 " The second line should not be indented.
30 " - The embedded-C braces do not line up correctly
31 " - Preprocessor braces don't line up correctly, and internals of the
32 " preprocessor aren't getting any special handling.
33 " - Embedded-C statements across multiple lines don't indent
34 " - '#' comments don't maintain indenting (they get treated like C
35 " preprocessor statements)