1# 2# AMX Mod X style for Pawn (or as close as possible) 3# 4 5####################### 6# Basic Indenting Stuff 7 8# (a/i/r) comment notation for add/ignore/remove which is the actual setting 9input_tab_size = 1 # tab size on input file: usually 8 10output_tab_size = 8 # tab size for output: usually 8 11indent_columns = 8 # ie 3 or 8 12indent_with_tabs = 2 # 1=only to the 'level' indent, 2=use tab indenting 13#indent_paren_nl = 1 # indent-align under paren for open followed by nl 14 15pp_indent = remove # indent preproc 1 space per level (a/i/r) 16pp_space = remove # spaces between # and word (add/ignore/remove) 17 18#indent_switch_case = 1 # spaces to indent case from switch 19#indent_case_brace = 0 # spaces to indent '{' from case 20 # (usually 0 or indent_columns) 21 22#indent_brace = 0 # spaces to indent '{' from level (usually 0) 23indent_braces = 0 # whether to indent the braces or not 24#indent_label = 0 # 0=left >0=col from left (absolute column), 25 # <0=sub from brace indent (relative column) 26 27indent_align_string = false # True/False - indent align broken strings 28indent_col1_comment = false # indent comments in column 1 29indent_func_call_param = false # indent continued function calls to indent_columns otherwise index_columns + spaces to align with open paren. 30 31indent_namespace = true # indent stuff inside namespace braces 32indent_class = true # indent stuff inside class braces 33 34 35############################ 36# Misc Inter-element Spacing 37# Force,Ignore,Add,Remove 38 39# ignored by nl_*_brace = true 40sp_paren_brace = force # space between ')' and '{' 41sp_fparen_brace = force # space between ')' and '{' of function 42sp_sparen_brace = force # space between ')' and '{' of if, while, etc 43 44sp_after_cast = force # space after cast - "(int) a" vs "(int)a" 45 46sp_before_byref = force # space before '&' of 'fcn(int& idx)' 47 48sp_inside_fparen = force # space inside 'foo( xxx )' vs 'foo(xxx)' 49sp_inside_fparens = remove # space inside 'foo( )' vs 'foo()' 50sp_inside_paren = remove # space inside '+ ( xxx )' vs '+ (xxx)' 51sp_inside_square = remove # space inside 'byte[ 5 ]' vs 'byte[5]' 52sp_inside_sparen = force # space inside 'if( xxx )' vs 'if(xxx)' 53sp_inside_for = force # space inside 'for( xxx )' vs 'for(xxx)' 54sp_inside_angle = ignore # space inside '<>', as in '<class T>' 55 56sp_before_sparen = force # space before '(' of 'if/for/while/switch' 57sp_after_sparen = force # space after ')' of 'if/for/while/switch' 58 # the do-while does not get set here 59 60sp_before_angle = ignore # space before '<>', as in '<class T>' 61sp_after_angle = ignore # space after '<>', as in '<class T>' 62 63sp_before_square = ignore # space before single '[' 64sp_before_squares = remove # space before '[]', as in 'byte []' 65 66sp_paren_paren = force # space between nested parens - '( (' vs '((' 67 68sp_return_paren = remove # space between 'return' and '(' 69sp_sizeof_paren = remove # space between 'sizeof' and '(' 70 71sp_after_comma = force # space after ',' 72 73sp_arith = force # space around + - / * etc 74sp_bool = force # space around || && 75sp_compare = force # space around < > ==, etc 76sp_assign = force # space around =, +=, etc 77 78sp_func_def_paren = remove # space between 'func' and '(' - "foo (" vs "foo(" 79sp_func_call_paren = remove # space between 'func' and '(' - "foo (" vs "foo(" 80sp_func_proto_paren = remove # space between 'func' and '(' - "foo (" vs "foo(" 81sp_func_class_paren = remove # space between ctor/dtor and '(' 82 83#sp_type_func = 1 # space between return type and 'func' 84 # a minimum of 1 is forced except for '*' 85 86 87sp_special_semi = remove # space empty stmt ';' on while, if, for 88 # example "while (*p++ = ' ') ;" 89sp_before_semi = remove # space before all ';' 90sp_inside_braces = force # space inside '{' and '}' - "{ 1, 2, 3 }" 91sp_inside_braces_enum = force # space inside enum '{' and '}' - "{ a, b, c }" 92sp_inside_braces_struct = force # space inside struct/union '{' and '}' 93 94sp_macro = force # space between macro and value, ie '#define a 6' 95sp_macro_func = force # space between macro and value, ie '#define a 6' 96 97sp_square_fparen = remove # weird pawn stuff: native yark[rect](a[rect]) 98sp_after_tag = remove # pawn: space after a tag colon 99 100 101################################ 102# Code Alignment 103# (not left column spaces/tabs) 104 105align_with_tabs = true # use tabs for aligning (0/1) 106align_keep_tabs = false # keep non-indenting tabs 107align_on_tabstop = true # always align on tabstops 108align_nl_cont = false # align the back-slash \n combo (macros) 109align_enum_equ_span = 1 # align the '=' in enums 110align_assign_span = 1 # align on '='. 0=don't align 111align_assign_thresh = 0 # threshold for aligning on '='. 0=no limit 112align_right_cmt_span = 8 # align comment that end lines. 0=don't align 113align_var_def_span = 1 # align variable defs on variable (span for regular stuff) 114align_var_def_thresh = 0 # align variable defs threshold 115align_var_def_inline = true # also align inline struct/enum/union var defs 116align_var_def_star_style = 1 # the star is part of the variable name 117align_var_def_colon = false # align the colon in struct bit fields 118align_var_struct_span = 1 # span for struct/union (0=don't align) 119align_pp_define_span = 1 # align bodies in #define statements 120align_pp_define_gap = 1 # min space between define label and value "#define a <---> 16" 121 122align_struct_init_span = 1 # align structure initializer values 123align_func_proto_span = 1 # align function prototypes 124align_number_right = false # right-align numbers (not fully supported, yet) 125align_typedef_span = 1 # align single-line typedefs 126align_typedef_gap = 1 # minimum spacing 127align_typedef_star_style = 1 # Start aligning style 128 # 0: '*' not part of type 129 # 1: '*' part of the type - no space 130 # 2: '*' part of type, dangling 131 132 133##################################### 134# Newline Adding and Removing Options 135# Add/Remove/Ignore 136 137nl_fdef_brace = add # "int foo() {" vs "int foo()\n{" 138nl_func_decl_start = ignore # newline after the '(' in a function decl 139nl_func_decl_args = ignore # newline after each ',' in a function decl 140nl_func_decl_end = ignore # newline before the ')' in a function decl 141nl_func_type_name = ignore # newline between return type and func name in def 142nl_func_var_def_blk = 0 # newline after a block of variable defs 143nl_before_case = false # newline before 'case' statement 144nl_after_return = false # newline after return statement 145nl_after_case = false # disallow nested "case 1: a=3;" 146nl_fcall_brace = add # newline between function call and open brace 147nl_squeeze_ifdef = false # no blanks after #ifxx, #elxx, or before #endif TRUE/F 148nl_enum_brace = ignore # nl between enum and brace 149nl_struct_brace = ignore # nl between struct and brace 150nl_union_brace = ignore # nl between union and brace 151nl_assign_brace = ignore # nl between '=' and brace 152nl_class_brace = ignore # nl between class name and brace 153nl_namespace_brace = ignore # nl between namespace name and brace 154 155nl_do_brace = add # nl between do and { 156nl_if_brace = add # nl between if and { 157nl_for_brace = add # nl between for and { 158nl_else_brace = remove # nl between else and { 159nl_while_brace = add # nl between while and { 160nl_switch_brace = add # nl between switch and { 161nl_brace_else = remove # nl between } and else 162nl_brace_while = add # nl between } and while of do stmt 163 164nl_elseif_brace = add # nl between close paren and open brace in 'else if () {' 165 166nl_define_macro = 0 # alter newlines in #define macros 167nl_start_of_file = ignore # alter newlines at the start of file 168nl_start_of_file_min = 0 # min number of newlines at the start of the file 169nl_end_of_file = ignore # alter newlines at the end of file 170nl_end_of_file_min = 0 # min number of newlines at the end of the file 171 172pos_bool = start # end=move &&/|| to EOL ignore=gnore, start=move to SOL 173 174##################### 175# Blank Line Options 176 177nl_before_block_comment = 3 # before a block comment (stand-alone 178 # comment-multi), except after brace open 179nl_after_func_body = 3 # after the closing brace of a function body 180nl_after_func_proto = 3 # after each prototype 181nl_after_func_proto_group = 3 # after a block of prototypes 182nl_max = 3 # maximum consecutive newlines (3=2 lines) 183 184eat_blanks_after_open_brace = true # remove blank lines after { 185eat_blanks_before_close_brace = true # remove blank lines before } 186 187######################## 188# Code Modifying Options 189# (non-whitespace) 190 191mod_paren_on_return = force # add or remove paren on return 192mod_full_brace_nl = 1 # max number of newlines to span w/o braces 193mod_full_brace_if = ignore # add or remove braces on if 194mod_full_brace_for = ignore # add or remove braces on for 195mod_full_brace_do = ignore # add or remove braces on do 196mod_full_brace_while = ignore # add or remove braces on while 197mod_pawn_semicolon = True # add optional semicolons 198mod_full_brace_function = add # add optional braces on Pawn functions 199 200 201####################### 202# Comment Modifications 203 204cmt_star_cont = true # put a star on subsequent comment lines 205cmt_cpp_to_c = true # convert CPP comments to C comments 206cmt_cpp_group = true # if UO_cmt_cpp_to_c, try to group in one big C comment 207cmt_cpp_nl_start = true # put a blank /* at the start of a converted group 208cmt_cpp_nl_end = true # put a nl before the */ in a converted group 209