[Bro] Bro script spacing

Matthias Vallentin vallentin at icir.org
Thu Aug 22 12:24:24 PDT 2013

> I hear there is a "style/format" for spacing syntax in bro scripts. Where can I become familiar with this?

The indentation is called Whitesmiths style [1]. We currently don't
have an exact guideline, for example like Google's style guide [2].
Maybe some editors have the ability to explicitly set a style. At
least in Vim, you can use this:

     autocmd FileType bro set noexpandtab cino='>1s,f1s,{1s'

This gives you reasonably close support for brace placement. (It also
assumes you have a Bro syntax plugin.)

I'm curious how others have tweaked their editors, not for syntax
highlighting, but to get an efficient and style-compatible working


[1] http://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style
[2] https://code.google.com/p/google-styleguide/

More information about the Bro mailing list