Module ImportFrom alias Assign NameStore Str ImportFrom alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Call NameLoad Str NameLoad FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Yield Str Expr Yield Str If AttributeLoad NameLoad attr body Expr Yield Str Expr Yield AttributeLoad NameLoad attr Expr Yield Str If AttributeLoad NameLoad attr body Expr Yield BinOpMod Str AttributeLoad NameLoad attr orelse For TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr body If CompareIn NameLoad TupleLoad Str Str Str body Continue If CompareIsNot NameLoad NameLoad body Expr Yield BinOpMod Str TupleLoad NameLoad NameLoad decorator_list Return Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot NameLoad CompareNotIn Str NameLoad body Continue Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad If Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num orelse If Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str NameLoad orelse Assign NameStore ListComp Call AttributeLoad NameLoad attr Str Num comprehension NameStore Call AttributeLoad NameLoad attr Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Raise Expr Yield Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults TupleLoad AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults TupleLoad UnaryOpNot AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Import alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Str Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args defaults vararg body Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign NameStore BoolOpOr BoolOpAnd NameLoad Call NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Import alias Assign AttributeStore NameLoad attr BinOpAdd ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Import alias Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad orelse If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Expr Call NameLoad NameLoad orelse Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A __future__ print_function N/A __doc__ 
vim2vim
=========
`vim2vim` transforms output from `:highlight`,
to a flat, plain ViM colorscheme.

Many ViM colorschemes and extensions utilize various functions for
configuring syntax highlighting. This utility works with ViM's
final, configured state.

Usage
------
1. (ViM) Write `:highlight` output to a file::

    :redir > vim_highlight_output.txt
    :highlight
    :redir END

2. (vim2vim) Transform vim colors to vim color syntax::

    vim2vim ./vim_highlight_output.txt | sort > my_colorscheme.vim

.. note:: Does not correctly tokenize multi-word font settings,
   requiring manual removal of `font=multi word font` settings
   from <vim_highlight_output.txt>
   for the time being. #TODO
 collections namedtuple N/A logging N/A log N/A N/A logging getLogger N/A ATTRS N/A name term cterm ctermfg ctermbg gui guifg guibg guisp font link cleared N/A ColorGroup N/A namedtuple ColorGroup ATTRS cg_str N/A N/A self N/A N/A _cg_str N/A N/A self N/A N/A N/A N/A self link N/A N/A N/A "  N/A N/A hi  N/A N/A self cleared N/A N/A N/A clear  N/A N/A N/A self name N/A N/A N/A N/A self link N/A N/A N/A N/A links to %s N/A self link N/A N/A N/A k v N/A N/A N/A N/A self _asdict iteritems N/A N/A N/A k N/A name cleared link N/A N/A N/A N/A v None N/A N/A N/A N/A  %s=%s N/A k v N/A N/A N/A N/A str join N/A _cg_str self N/A N/A N/A ColorGroup __str__ cg_str vim2vim N/A N/A filename N/A N/A N/A Transform output from `:highlight` to a flat, plain vim colorscheme.

     N/A N/A open filename r f N/A N/A line f N/A N/A N/A N/A log debug N/A N/A line rstrip N/A l N/A N/A line strip N/A N/A N/A l N/A xxx l N/A N/A N/A N/A name attrs N/A N/A l split xxx N/A name N/A N/A name strip N/A attrs N/A N/A attrs strip N/A attrdict N/A N/A dict fromkeys ATTRS None N/A N/A attrdict N/A name name N/A N/A N/A attrs startswith links to N/A N/A N/A attrdict N/A link N/A N/A N/A attrs split links to  N/A -1 N/A N/A N/A N/A attrs startswith cleared N/A N/A N/A attrdict N/A cleared True N/A N/A _attrs N/A N/A N/A x split = 1 N/A x N/A N/A attrs split N/A N/A N/A N/A N/A attrdict update _attrs N/A N/A N/A ValueError N/A N/A N/A N/A log error _attrs N/A N/A N/A N/A ColorGroup attrdict N/A sort_by_name_clear_inline N/A N/A iterable N/A N/A N/A N/A sorted iterable key N/A N/A N/A x N/A N/A N/A x name N/A N/A x cleared N/A N/A x link N/A sort_by_name_clear_to_top N/A N/A iterable N/A N/A N/A N/A sorted iterable key N/A N/A N/A x N/A N/A N/A N/A x cleared N/A x name N/A x link N/A N/A unittest Test_vim2vim N/A N/A unittest TestCase N/A test_vim2vim N/A N/A self N/A N/A N/A os.path N/A filename N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ .. tests vim_highlight_output.txt N/A N/A print filename N/A N/A N/A log info filename N/A color_groups N/A vim2vim filename N/A group color_groups N/A N/A N/A N/A log debug group N/A N/A main N/A N/A N/A args N/A N/A logging N/A optparse N/A sys N/A prs N/A N/A optparse OptionParser usage %prog [-s|-S] <vim_highlight_output.txt> description N/A vim2vim __doc__ N/A N/A N/A prs add_option -s --sort-by-name-clear-inline dest sort_by_name_clear_inline help Sort by name w/ "hi clear <name>" lines inline action store_true N/A N/A N/A prs add_option -S --sort-by-name-clear-to-top dest sort_by_name_clear_to_top help sort by name w/ "hi clear <name>" lines at the top action store_true N/A N/A N/A prs add_option -v --verbose dest verbose action store_true N/A N/A N/A prs add_option -q --quiet dest quiet action store_true N/A N/A N/A prs add_option -t --test dest run_tests action store_true N/A args N/A N/A args N/A list args N/A N/A sys argv N/A 1 N/A N/A opts args N/A N/A prs parse_args args N/A N/A N/A opts quiet N/A N/A N/A N/A logging basicConfig N/A N/A opts verbose N/A N/A N/A N/A N/A N/A logging getLogger setLevel N/A logging DEBUG N/A N/A opts run_tests N/A N/A sys N/A N/A sys argv N/A N/A N/A N/A sys argv N/A 0 args N/A unittest N/A N/A N/A sys exit N/A N/A unittest main N/A N/A len args N/A N/A filename N/A args N/A 0 N/A color_groups N/A vim2vim filename N/A N/A opts sort_by_name_clear_inline N/A N/A color_groups N/A sort_by_name_clear_inline color_groups N/A N/A N/A opts sort_by_name_clear_to_top N/A N/A color_groups N/A sort_by_name_clear_to_top color_groups N/A group color_groups N/A N/A N/A print group N/A N/A N/A print __doc__ N/A N/A N/A prs print_help N/A N/A N/A __name__ __main__ N/A N/A N/A main