Skip to content

Commit

Permalink
sort headers alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
m42e committed Dec 18, 2015
1 parent 729cf87 commit 77d882f
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions plugin/cpp_auto_include.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,48 +82,48 @@ module CppAutoInclude

# header, std namespace, keyword complete (false: no auto remove #include), unioned regex
HEADER_STD_COMPLETE_REGEX = [
['cstdio', false, true , R[F['s?scanf', 'puts', 's?printf', 'f?gets', '(?:get|put)char', 'getc'], C['FILE','std(?:in|out|err)','EOF']] ],
['cassert', false, true , R[F['assert']] ],
['cstring', false, true , R[F['mem(?:cpy|set|n?cmp)', 'str(?:len|n?cmp|n?cpy|error|cat|str|chr)']] ],
['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']] ],
['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]*']] ],
['strings.h', false, true , R[F['b(?:cmp|copy|zero)', 'strn?casecmp']] ],
['typeinfo', false, true , R[C['typeid']] ],
['new', true , true , R[F['set_new_handler'], C['nothrow']] ],
['limits', true , true , R[T['numeric_limits']] ],
['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']] ],
['numeric', true , true , R[F['partial_sum', 'accumulate', 'adjacent_difference', 'inner_product']] ],
['iostream', true , true , R[C['c(?:err|out|in)']] ],
['sstream', true , true , R[C['[io]?stringstream']] ],
['array', true , true , R[T['array']] ],
['atomic', true , true , R[T['atomic_']] ],
['bitset', true , true , R[T['bitset']] ],
['cassert', false, true , R[F['assert']] ],
['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]*']] ],
['complex', true , true , R[T['complex']] ],
['deque', true , true , R[T['deque']] ],
['queue', true , true , R[T['queue','priority_queue']] ],
['list', true , true , R[T['list']] ],
['map', true , true , R[T['(?:multi)?map']] ],
['set', true , true , R[T['(?:multi)?set']] ],
['vector', true , true , R[T['vector']] ],
['iomanip', true , true , R[F['setprecision', 'setbase', 'setw'], C['fixed', 'hex']]],
['fstream', true , true , R[T['fstream']] ],
['cstdio', false, true , R[F['s?scanf', 'puts', 's?printf', 'f?gets', '(?:get|put)char', 'getc'], C['FILE','std(?:in|out|err)','EOF']] ],
['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']] ],
['cstring', false, true , R[F['mem(?:cpy|set|n?cmp)', 'str(?:len|n?cmp|n?cpy|error|cat|str|chr)']] ],
['ctime', false, true , R[F['time', 'clock'], C['CLOCKS_PER_SEC']]],
['string', true , true , R[C['string']] ],
['utility', true , true , R[T['pair'], F['make_pair']] ],
['array', true , true , R[T['array']] ],
['atomic', true , true , R[T['atomic_']] ],
['cuchar', true , true , R[F['mbrtoc(?:16|32)', 'c(?:16|32)rtomb']] ],
['deque', true , true , R[T['deque']] ],
['forward_list', true , true , R[T['forward_list']] ],
['fstream', true , true , R[T['fstream']] ],
['iomanip', true , true , R[F['setprecision', 'setbase', 'setw'], C['fixed', 'hex']]],
['iomanip', true , true , R[F['setprecision', 'setiosflags', 'setbase', 'setw', '(?:set|put)_(?:money|time)'], C['fixed', 'hex']]],
['iostream', true , true , R[C['c(?:err|out|in)']] ],
['iostream', true , true , R[C['c(?:err|out|in)']] ],
['limits', true , true , R[T['numeric_limits']] ],
['limits', true , true , R[T['numeric_limits']] ],
['list', true , true , R[T['list']] ],
['list', true , true , R[T['list']] ],
['map', true , true , R[T['(?:multi)?map']] ],
['map', true , true , R[T['(?:multi)?map']] ],
['new', true , true , R[F['set_new_handler'], C['nothrow']] ],
['new', true , true , R[F['set_new_handler'], C['nothrow']] ],
['numeric', true , true , R[F['partial_sum', 'accumulate', 'adjacent_difference', 'inner_product']] ],
['queue', true , true , R[T['queue','priority_queue']] ],
['set', true , true , R[T['(?:multi)?set']] ],
['sstream', true , true , R[C['[io]?stringstream']] ],
['string', true , true , R[C['string']] ],
['strings.h', false, true , R[F['b(?:cmp|copy|zero)', 'strn?casecmp']] ],
['thread', true , true , R[C['thread'], F['this_thread::']],],
['tuple', true , true , R[T['tuple'], F['make_tuple', 'tie', 'tuple_cat', 'forward_as_tuple']] ],
['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' ]] ],
['typeindex', true , true , R[T['type_index']] ],
['typeinfo', false, true , R[C['typeid']] ],
['unordered_map', true , true , R[T['unordered_(?:multi)?map']] ],
['unordered_set', true , true , R[T['unordered_(?:multi)?set']] ],
['utility', true , true , R[T['pair'], F['make_pair']] ],
['vector', true , true , R[T['vector']] ],
]

USING_STD = 'using namespace std;'
Expand Down

0 comments on commit 77d882f

Please sign in to comment.