variable used in lambda代码格式化⼯具uncrustify配置⽂件选项详解
Uncrustify是⼀个代码美化⼯具可⽤于C,C++,C#,D和Java源代码的美化。它能够利⽤空格,tab与空格或只有tab进⾏缩排,添加或删除换⾏,排列代码等。Uncrustify具有⾼配置性,易于修改的特点。持mac win linux平台,可单独使⽤,也可被第三⽅⼯具(如Source insight,Atom)调⽤。
⽬录
通⽤(general)
换⾏风格
# The type of line endings
newlines = auto # auto/lf/crlf/cr
输⼊⽂件的tab ⼤⼩
# The original size of tabs in the input
input_tab_size = 8 # number
输出尺⼨的tab⼤⼩
# The size of tabs in the output (only used if align_with_tabs=true)
output_tab_size = 8 # number
# The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn)
string_escape_char = 92 # number
运⾏将'>=' 和 '>>='当作模板的⼀部分
# Allow interpreting '>=' and '>>=' as part of a template in 'void f(list<list<B>>=val);'.
# If true (default), 'assert(x<0 && y>=3)' will be broken.
# Improvements to template detection may make this option obsolete.
tok_split_gte = false # false/true
控制如何处理UTF-8 BOM
# Control what to do with the UTF-8 BOM (recommend 'remove')
utf8_bom = ignore # ignore/add/remove/force
若⽂件包含值为128到255的⾮UTF-8字节,则输出为UTF-8
# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8 utf8_byte = false # false/true
强制输出编码为UTF-8
# Force the output encoding to UTF-8
utf8_force = false # false/true
缩进(Indent)
每个级别缩进的列数
# The number of columns to indent per level.
# Usually 2, 3, 4, or 8.
indent_columns = 8 # number
连续(continuation)缩进,如果⾮0,则会覆盖'(' 和 '='的连续缩进。
# The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents.
# For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level
indent_continue = 0 # number
缩进时如何使⽤tab
# How to use tabs when indenting code
# 0=spaces only
# 1=indent with tabs to brace level, align with spaces
# 2=indent and align with tabs, using spaces when not on a tabstop
indent_with_tabs = 1 # number
不在花括号级别的注释,⽤tab缩进到制表符tabstop
# Comments that are not a brace level are indented with tabs on a tabstop.
# Requires indent_with_tabs=2. If false, will use spaces.
indent_cmt_with_tabs = false # false/true
是否缩进被'\'划断的string,这样他们就可以line up。这个选项我⾄今没搞懂啥意思
# Whether to indent strings broken by '\' so that they line up
⽤以将'{'远离级别(level)的空格数
# Spaces to indent '{' from level
indent_brace = 0 # number
花括号是否与语句体缩进到⼀起
# Whether braces are indented to the body level
indent_braces = false # false/true
单独的开关,函数、class、struct、'namespace'、
是否禁⽤缩进函数、class、struct、'namespace'的花括号
# Disabled indenting function braces if indent_braces is true
indent_braces_no_func = false # false/true
# Disabled indenting class braces if indent_braces is true
indent_braces_no_class = false # false/true
# Disabled indenting struct braces if indent_braces is true
indent_braces_no_struct = false # false/true
基于花括号的上层来缩进。例如,上层为'if',则缩进3个空格,上层为'for',则缩进4个空格
# Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. indent_brace_parent = false # false/true
'namespace'是否缩进
# Whether the 'namespace' body is indented
indent_namespace = false # false/true
缩进空格数
# The number of spaces to indent a namespace block
⼤于此⾏数的'namespace'不被缩进
# If the body of the namespace is longer than this number, it won't be indented.
# Requires indent_namespace=true. Default=0 (no limit)
indent_namespace_limit = 0 # number
'extern "C"、'class'体是否缩进
# Whether the 'extern "C"' body is indented
indent_extern = false # false/true
# Whether the 'class' body is indented
indent_class = false # false/true
是否缩进以类、冒号打头的内容
# Whether to indent the stuff after a leading class colon
indent_class_colon = false # false/true
成员初始化虚拟缩进,远离':'
# Virtual indent from the ':' for member initializers. Default is 2
indent_ctor_init_leading = 2 # number
构造函数初始化列表,额外缩进
# Additional indenting for constructor initializer list
indent_ctor_init = 0 # number
将'else \n if' 当作 'else if'来缩进
# False=treat 'else\nif' as 'else if' for indenting purposes
# True=indent the 'if' one level
indent_else_if = false # false/true
开花括号后的变量声明的缩进数量
# Amount to indent variable declarations after a open brace. neg=relative, pos=absolute indent_var_def_blk = 0 # number
缩进连续变量声明⽽⾮对齐
# Indent continued variable declarations instead of aligning.
indent_var_def_cont = false # false/true
true,强制将函数定义从列1开始缩进
false,使⽤默认⾏为
# True: force indentation of function definition to start in column 1
# False: use the default behavior
indent_func_def_force_col1 = false # false/true
以1个缩进级别缩进连续的函数调⽤参数
# True: indent continued function call parameters one indent level
# False: align parameters under the open paren
indent_func_call_param = false # false/true
与上相同,不过是⽤于函数定义、函数原型,类声明
下⾯各种相同,不再赘述
# Same as indent_func_call_param, but for function defs
indent_func_def_param = false # false/true
# Same as indent_func_call_param, but for function protos
indent_func_proto_param = false # false/true
# Same as indent_func_call_param, but for class declarations
indent_func_class_param = false # false/true
# Same as indent_func_call_param, but for class variable constructors indent_func_ctor_var_param = false # false/true
# Same as indent_func_call_param, but for templates
indent_template_param = false # false/true
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论