]> sourceware.org Git - systemtap.git/blame - vim/indent/stap.vim
* clarify utility of epilogue-type probe aliases in documentation
[systemtap.git] / vim / indent / stap.vim
CommitLineData
0dd17aef
JS
1" Vim indent file
2" Language: SystemTap
3" Maintainer: Josh Stone <joshua.i.stone@intel.com>
4" Last Change: 2005 Dec 15
5
6" Only load this indent file when no other was loaded.
7if exists("b:did_indent")
8 finish
9endif
10let 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...
17setlocal cindent
18
19" Statements don't require a ';', so don't indent following lines
20setlocal 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)
This page took 0.043984 seconds and 5 git commands to generate.