Skip to content

Commit 77d882f

Browse files
committed
sort headers alphabetically
1 parent 729cf87 commit 77d882f

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

plugin/cpp_auto_include.vim

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,48 +82,48 @@ module CppAutoInclude
8282

8383
# header, std namespace, keyword complete (false: no auto remove #include), unioned regex
8484
HEADER_STD_COMPLETE_REGEX = [
85-
['cstdio', false, true , R[F['s?scanf', 'puts', 's?printf', 'f?gets', '(?:get|put)char', 'getc'], C['FILE','std(?:in|out|err)','EOF']] ],
86-
['cassert', false, true , R[F['assert']] ],
87-
['cstring', false, true , R[F['mem(?:cpy|set|n?cmp)', 'str(?:len|n?cmp|n?cpy|error|cat|str|chr)']] ],
88-
['cstdlib', false, true , R[F['system','abs','ato[if]', 'itoa', 'strto[dflu]+','free','exit','l?abs','s?rand(?:_r|om)?','qsort'], C['EXIT_[A-Z]*', 'NULL']] ],
89-
['cmath', false, true , R[F['pow[fl]?','a?(?:sin|cos|tan)[hl]*', 'atan2[fl]?', 'exp[m12fl]*', 'fabs[fl]?', 'log[210fl]+', 'nan[fl]?', '(?:ceil|floor)[fl]?', 'l?l?round[fl]?', 'sqrt[fl]?'], C['M_[A-Z24_]*', 'NAN', 'INFINITY', 'HUGE_[A-Z]*']] ],
90-
['strings.h', false, true , R[F['b(?:cmp|copy|zero)', 'strn?casecmp']] ],
91-
['typeinfo', false, true , R[C['typeid']] ],
92-
['new', true , true , R[F['set_new_handler'], C['nothrow']] ],
93-
['limits', true , true , R[T['numeric_limits']] ],
9485
['algorithm', true , true , R[F['(?:stable_|partial_)?sort(?:_copy)?', 'unique(?:_copy)?', 'reverse(?:_copy)?', 'nth_element', '(?:lower|upper)_bound', 'binary_search', '(?:prev|next)_permutation', 'min', 'max', 'count', 'random_shuffle', 'swap']] ],
95-
['numeric', true , true , R[F['partial_sum', 'accumulate', 'adjacent_difference', 'inner_product']] ],
96-
['iostream', true , true , R[C['c(?:err|out|in)']] ],
97-
['sstream', true , true , R[C['[io]?stringstream']] ],
86+
['array', true , true , R[T['array']] ],
87+
['atomic', true , true , R[T['atomic_']] ],
9888
['bitset', true , true , R[T['bitset']] ],
89+
['cassert', false, true , R[F['assert']] ],
90+
['cmath', false, true , R[F['pow[fl]?','a?(?:sin|cos|tan)[hl]*', 'atan2[fl]?', 'exp[m12fl]*', 'fabs[fl]?', 'log[210fl]+', 'nan[fl]?', '(?:ceil|floor)[fl]?', 'l?l?round[fl]?', 'sqrt[fl]?'], C['M_[A-Z24_]*', 'NAN', 'INFINITY', 'HUGE_[A-Z]*']] ],
9991
['complex', true , true , R[T['complex']] ],
100-
['deque', true , true , R[T['deque']] ],
101-
['queue', true , true , R[T['queue','priority_queue']] ],
102-
['list', true , true , R[T['list']] ],
103-
['map', true , true , R[T['(?:multi)?map']] ],
104-
['set', true , true , R[T['(?:multi)?set']] ],
105-
['vector', true , true , R[T['vector']] ],
106-
['iomanip', true , true , R[F['setprecision', 'setbase', 'setw'], C['fixed', 'hex']]],
107-
['fstream', true , true , R[T['fstream']] ],
92+
['cstdio', false, true , R[F['s?scanf', 'puts', 's?printf', 'f?gets', '(?:get|put)char', 'getc'], C['FILE','std(?:in|out|err)','EOF']] ],
93+
['cstdlib', false, true , R[F['system','abs','ato[if]', 'itoa', 'strto[dflu]+','free','exit','l?abs','s?rand(?:_r|om)?','qsort'], C['EXIT_[A-Z]*', 'NULL']] ],
94+
['cstring', false, true , R[F['mem(?:cpy|set|n?cmp)', 'str(?:len|n?cmp|n?cpy|error|cat|str|chr)']] ],
10895
['ctime', false, true , R[F['time', 'clock'], C['CLOCKS_PER_SEC']]],
109-
['string', true , true , R[C['string']] ],
110-
['utility', true , true , R[T['pair'], F['make_pair']] ],
111-
['array', true , true , R[T['array']] ],
112-
['atomic', true , true , R[T['atomic_']] ],
11396
['cuchar', true , true , R[F['mbrtoc(?:16|32)', 'c(?:16|32)rtomb']] ],
97+
['deque', true , true , R[T['deque']] ],
11498
['forward_list', true , true , R[T['forward_list']] ],
99+
['fstream', true , true , R[T['fstream']] ],
100+
['iomanip', true , true , R[F['setprecision', 'setbase', 'setw'], C['fixed', 'hex']]],
115101
['iomanip', true , true , R[F['setprecision', 'setiosflags', 'setbase', 'setw', '(?:set|put)_(?:money|time)'], C['fixed', 'hex']]],
116102
['iostream', true , true , R[C['c(?:err|out|in)']] ],
103+
['iostream', true , true , R[C['c(?:err|out|in)']] ],
104+
['limits', true , true , R[T['numeric_limits']] ],
117105
['limits', true , true , R[T['numeric_limits']] ],
118106
['list', true , true , R[T['list']] ],
107+
['list', true , true , R[T['list']] ],
108+
['map', true , true , R[T['(?:multi)?map']] ],
119109
['map', true , true , R[T['(?:multi)?map']] ],
120110
['new', true , true , R[F['set_new_handler'], C['nothrow']] ],
111+
['new', true , true , R[F['set_new_handler'], C['nothrow']] ],
112+
['numeric', true , true , R[F['partial_sum', 'accumulate', 'adjacent_difference', 'inner_product']] ],
113+
['queue', true , true , R[T['queue','priority_queue']] ],
114+
['set', true , true , R[T['(?:multi)?set']] ],
115+
['sstream', true , true , R[C['[io]?stringstream']] ],
116+
['string', true , true , R[C['string']] ],
117+
['strings.h', false, true , R[F['b(?:cmp|copy|zero)', 'strn?casecmp']] ],
121118
['thread', true , true , R[C['thread'], F['this_thread::']],],
122119
['tuple', true , true , R[T['tuple'], F['make_tuple', 'tie', 'tuple_cat', 'forward_as_tuple']] ],
123120
['type_traits', true , true , R[T['aligned_storage', 'alignment_of', 'common_type', 'conditional', 'decay', 'enable_if', 'extent', 'has_virtual_destructor', 'rank', 'result_of', 'underlying_type', 'add_(const|cv|lvalue_reference|pointer|rvalue_reference|volatile)', 'is_((nothrow|trivially)_)?((move|copy|default)_)?(assignable|constructible|destructible)', 'is_member_((function|object)_)?pointer', 'is_[rl]value_reference', 'remove_(all_extents|const|cv|extent|pointer|reference|volatile)', 'is_(abstract|arithmetic|array|base_of|class|compound|const|convertible|empty|enum|floating_point|function|fundamental|integral|literal_type|object|pod|(null_)?pointer|polymorphic|reference|same|scalar|(un)?signed|standard_layout|trivial|union|volatile|void)', 'make_(un)?signed' ]] ],
124121
['typeindex', true , true , R[T['type_index']] ],
122+
['typeinfo', false, true , R[C['typeid']] ],
125123
['unordered_map', true , true , R[T['unordered_(?:multi)?map']] ],
126124
['unordered_set', true , true , R[T['unordered_(?:multi)?set']] ],
125+
['utility', true , true , R[T['pair'], F['make_pair']] ],
126+
['vector', true , true , R[T['vector']] ],
127127
]
128128

129129
USING_STD = 'using namespace std;'

0 commit comments

Comments
 (0)