def setUp(self): if PLUGIN_NAME not in ORGMODE.plugins: ORGMODE.register_plugin(PLUGIN_NAME) self.editcheckbox = ORGMODE.plugins[PLUGIN_NAME] self.c1 = u""" * heading1 [%] - [ ] checkbox1 [/] - [ ] checkbox2 - [ ] checkbox3 - [ ] checkbox4 - [ ] checkbox5 - [ ] checkbox6 - [ ] checkbox7 - [ ] checkbox8 """.split(u'\n') self.c2 = u""" * a checkbox list [%] - checkbox [0%] - [ ] test1 - [ ] test2 - [ ] test3 """.split(u'\n') self.c3 = u""" * heading 1. [ ] another main task [%] - [ ] sub task 1 - [ ] sub task 2 2. [ ] another main task """.split(u'\n')
def setUp(self): self.keybindings = [] # this has to be registered since some plugins execute :au orgmode and # the group can not be found vim.command(""" augroup orgmode au BufEnter * :if &filetype == "org" | call <SID>OrgRegisterMenu() | endif au BufLeave * :if &filetype == "org" | call <SID>OrgUnregisterMenu() | endif au BufDelete * :call <SID>OrgDeleteUnusedDocument(expand('<abuf>')) augroup END """) # TODO: this is obsolete with nvim testing vim.EVALRESULTS = { u'exists("g:org_debug")': 0, u'exists("b:org_debug")': 0, u'exists("*repeat#set()")': 0, u'b:changedtick': 0, u'exists("b:org_plugins")': 0, u'exists("g:org_plugins")': 1, u'g:org_plugins': ORG_PLUGINS, } for plugin in filter(lambda p: p != '|', ORG_PLUGINS): try: ORGMODE.register_plugin(plugin) except PluginError: pass if plugin in ORGMODE._plugins: self.keybindings.extend(ORGMODE._plugins[plugin].keybindings)
def setUp(self): global counter counter += 1 vim.CMDHISTORY = [] vim.CMDRESULTS = {} vim.EVALHISTORY = [] vim.EVALRESULTS = { # no org_todo_keywords for b u'exists("b:org_todo_keywords")'.encode(u'utf-8'): '0'.encode(u'utf-8'), # global values for org_todo_keywords u'exists("g:org_todo_keywords")'.encode(u'utf-8'): '1'.encode(u'utf-8'), u'g:org_todo_keywords'.encode(u'utf-8'): [ u'TODO'.encode(u'utf-8'), u'DONE'.encode(u'utf-8'), u'|'.encode(u'utf-8') ], u'&ts'.encode(u'utf-8'): u'6'.encode(u'utf-8'), u'exists("b:org_tag_column")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("g:org_tag_column")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("g:org_debug")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_debug")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("*repeat#set()")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'b:changedtick'.encode(u'utf-8'): (u'%d' % counter).encode(u'utf-8'), u"v:count".encode(u'utf-8'): u'0'.encode(u'utf-8') } if not u'TagsProperties' in ORGMODE.plugins: ORGMODE.register_plugin(u'TagsProperties') self.tagsproperties = ORGMODE.plugins[u'TagsProperties'] vim.current.buffer[:] = [ i.encode(u'utf-8') for i in u""" * Überschrift 1 Text 1 Bla bla ** Überschrift 1.1 Text 2 Bla Bla bla ** Überschrift 1.2 Text 3 **** Überschrift 1.2.1.falsch Bla Bla bla bla *** Überschrift 1.2.1 * Überschrift 2 * Überschrift 3 asdf sdf """.split(u'\n') ]
def setUp(self): global counter counter += 1 vim.CMDHISTORY = [] vim.CMDRESULTS = {} vim.EVALHISTORY = [] vim.EVALRESULTS = { # no org_todo_keywords for b u_encode(u'exists("b:org_todo_keywords")'): u_encode('0'), # global values for org_todo_keywords u_encode(u'exists("g:org_todo_keywords")'): u_encode('1'), u_encode(u'g:org_todo_keywords'): [u_encode(u'TODO'), u_encode(u'DONE'), u_encode(u'|')], u_encode(u'exists("g:org_debug")'): u_encode(u'0'), u_encode(u'exists("g:org_debug")'): u_encode(u'0'), u_encode(u'exists("*repeat#set()")'): u_encode(u'0'), u_encode(u'b:changedtick'): u_encode(u'%d' % counter), u_encode(u"v:count"): u_encode(u'0'), } vim.current.buffer[:] = [ u_encode(i) for i in u""" * Überschrift 1 Text 1 Bla bla ** Überschrift 1.1 Text 2 Bla Bla bla ** Überschrift 1.2 Text 3 **** Überschrift 1.2.1.falsch Bla Bla bla bla *** Überschrift 1.2.1 * Überschrift 2 * Überschrift 3 asdf sdf """.split(u'\n') ] if not u'Navigator' in ORGMODE.plugins: ORGMODE.register_plugin(u'Navigator') self.navigator = ORGMODE.plugins[u'Navigator']
def setUp(self): global counter counter += 1 vim.CMDHISTORY = [] vim.CMDRESULTS = {} vim.EVALHISTORY = [] vim.EVALRESULTS = { # no org_todo_keywords for b u_encode(u'exists("b:org_todo_keywords")'): u_encode('0'), # global values for org_todo_keywords u_encode(u'exists("g:org_todo_keywords")'): u_encode('1'), u_encode(u'g:org_todo_keywords'): [u_encode(u'TODO'), u_encode(u'|'), u_encode(u'DONE')], u_encode(u'exists("g:org_improve_split_heading")'): u_encode(u'0'), u_encode(u'exists("b:org_improve_split_heading")'): u_encode(u'0'), u_encode(u'exists("g:org_debug")'): u_encode(u'0'), u_encode(u'exists("b:org_debug")'): u_encode(u'0'), u_encode(u'exists("*repeat#set()")'): u_encode(u'0'), u_encode(u'b:changedtick'): u_encode(u'%d' % counter), u_encode(u'&ts'): u_encode(u'8'), u_encode(u'exists("g:org_tag_column")'): u_encode(u'0'), u_encode(u'exists("b:org_tag_column")'): u_encode(u'0'), u_encode(u"v:count"): u_encode(u'0'), # jump to insert mode after adding heading/checkbox u_encode(u'exists("g:org_prefer_insert_mode")'): u_encode(u'0'), u_encode(u'exists("b:org_prefer_insert_mode")'): u_encode(u'0') } if not u'EditStructure' in ORGMODE.plugins: ORGMODE.register_plugin(u'EditStructure') self.editstructure = ORGMODE.plugins[u'EditStructure'] vim.current.buffer[:] = [u_encode(i) for i in u""" * Überschrift 1 Text 1 Bla bla ** Überschrift 1.1 Text 2 Bla Bla bla ** Überschrift 1.2 Text 3 **** Überschrift 1.2.1.falsch Bla Bla bla bla *** Überschrift 1.2.1 * Überschrift 2 * Überschrift 3 asdf sdf """.split(u'\n')]
def setUp(self): global counter counter += 1 vim.CMDHISTORY = [] vim.CMDRESULTS = {} vim.EVALHISTORY = [] vim.EVALRESULTS = { # no org_todo_keywords for b u_encode(u'exists("b:org_todo_keywords")'): u_encode('0'), # global values for org_todo_keywords u_encode(u'exists("g:org_todo_keywords")'): u_encode('1'), u_encode(u'g:org_todo_keywords'): [u_encode(u'TODO'), u_encode(u'|'), u_encode(u'DONE')], u_encode(u'exists("g:org_improve_split_heading")'): u_encode(u'0'), u_encode(u'exists("b:org_improve_split_heading")'): u_encode(u'0'), u_encode(u'exists("g:org_debug")'): u_encode(u'0'), u_encode(u'exists("b:org_debug")'): u_encode(u'0'), u_encode(u'exists("*repeat#set()")'): u_encode(u'0'), u_encode(u'b:changedtick'): u_encode(u'%d' % counter), u_encode(u'&ts'): u_encode(u'8'), u_encode(u'exists("g:org_tag_column")'): u_encode(u'0'), u_encode(u'exists("b:org_tag_column")'): u_encode(u'0'), u_encode(u"v:count"): u_encode(u'0'), # jump to insert mode after adding heading/checkbox u_encode(u'exists("g:org_prefer_insert_mode")'): u_encode(u'0'), u_encode(u'exists("b:org_prefer_insert_mode")'): u_encode(u'0')} if not u'EditStructure' in ORGMODE.plugins: ORGMODE.register_plugin(u'EditStructure') self.editstructure = ORGMODE.plugins[u'EditStructure'] vim.current.buffer[:] = [u_encode(i) for i in u""" * Überschrift 1 Text 1 Bla bla ** Überschrift 1.1 Text 2 Bla Bla bla ** Überschrift 1.2 Text 3 **** Überschrift 1.2.1.falsch Bla Bla bla bla *** Überschrift 1.2.1 * Überschrift 2 * Überschrift 3 asdf sdf """.split(u'\n')]
def setUp(self): global counter counter += 1 vim.CMDHISTORY = [] vim.CMDRESULTS = {} vim.EVALHISTORY = [] vim.EVALRESULTS = { # no org_todo_keywords for b u'exists("b:org_todo_keywords")'.encode(u'utf-8'): '0'.encode(u'utf-8'), # global values for org_todo_keywords u'exists("g:org_todo_keywords")'.encode(u'utf-8'): '1'.encode(u'utf-8'), u'g:org_todo_keywords'.encode(u'utf-8'): [u'TODO'.encode(u'utf-8'), u'DONE'.encode(u'utf-8'), u'|'.encode(u'utf-8')], u'exists("g:org_improve_split_heading")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_improve_split_heading")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("g:org_debug")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_debug")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("*repeat#set()")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'b:changedtick'.encode(u'utf-8'): (u'%d' % counter).encode(u'utf-8'), u'&ts'.encode(u'utf-8'): u'8'.encode(u'utf-8'), u'exists("g:org_tag_column")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_tag_column")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u"v:count".encode(u'utf-8'): u'0'.encode(u'utf-8')} if not u'EditStructure' in ORGMODE.plugins: ORGMODE.register_plugin(u'EditStructure') self.editstructure = ORGMODE.plugins[u'EditStructure'] vim.current.buffer[:] = [ i.encode(u'utf-8') for i in u""" * Überschrift 1 Text 1 Bla bla ** Überschrift 1.1 Text 2 Bla Bla bla ** Überschrift 1.2 Text 3 **** Überschrift 1.2.1.falsch Bla Bla bla bla *** Überschrift 1.2.1 * Überschrift 2 * Überschrift 3 asdf sdf """.split(u'\n')]
def setUp(self): self.keybindings = [] vim.EVALRESULTS = { u'exists("g:org_debug")': 0, u'exists("b:org_debug")': 0, u'exists("*repeat#set()")': 0, u'b:changedtick': 0, u_encode(u'exists("b:org_plugins")'): 0, u_encode(u'exists("g:org_plugins")'): 1, u_encode(u'g:org_plugins'): ORG_PLUGINS, } for plugin in filter(lambda p: p != '|', ORG_PLUGINS): try: ORGMODE.register_plugin(plugin) except PluginError: pass if plugin in ORGMODE._plugins: self.keybindings.extend(ORGMODE._plugins[plugin].keybindings)
def setUp(self): global counter counter += 1 vim.CMDHISTORY = [] vim.CMDRESULTS = {} vim.EVALHISTORY = [] vim.EVALRESULTS = { # no org_todo_keywords for b u_encode(u'exists("b:org_todo_keywords")'): u_encode('0'), # global values for org_todo_keywords u_encode(u'exists("g:org_todo_keywords")'): u_encode('1'), u_encode(u'g:org_todo_keywords'): [u_encode(u'TODO'), u_encode(u'|'), u_encode(u'DONE')], u_encode(u'&ts'): u_encode(u'6'), u_encode(u'exists("b:org_tag_column")'): u_encode(u'0'), u_encode(u'exists("g:org_tag_column")'): u_encode(u'0'), u_encode(u'exists("g:org_debug")'): u_encode(u'0'), u_encode(u'exists("b:org_debug")'): u_encode(u'0'), u_encode(u'exists("*repeat#set()")'): u_encode(u'0'), u_encode(u'b:changedtick'): (u_encode(u'%d' % counter)), u_encode(u"v:count"): u_encode(u'0')} if not u'TagsProperties' in ORGMODE.plugins: ORGMODE.register_plugin(u'TagsProperties') self.tagsproperties = ORGMODE.plugins[u'TagsProperties'] vim.current.buffer[:] = [ u_encode(i) for i in u""" * Überschrift 1 Text 1 Bla bla ** Überschrift 1.1 Text 2 Bla Bla bla ** Überschrift 1.2 Text 3 **** Überschrift 1.2.1.falsch Bla Bla bla bla *** Überschrift 1.2.1 * Überschrift 2 * Überschrift 3 asdf sdf """.split(u'\n') ]
def setUp(self): self.keybindings = [] vim.EVALRESULTS = { u'exists("g:org_debug")': 0, u'exists("b:org_debug")': 0, u'exists("*repeat#set()")': 0, u"b:changedtick": 0, u_encode(u'exists("b:org_plugins")'): 0, u_encode(u'exists("g:org_plugins")'): 1, u_encode(u"g:org_plugins"): ORG_PLUGINS, } for plugin in filter(lambda p: p != "|", ORG_PLUGINS): try: ORGMODE.register_plugin(plugin) except PluginError: pass if plugin in ORGMODE._plugins: self.keybindings.extend(ORGMODE._plugins[plugin].keybindings)
def setUp(self): if PLUGIN_NAME not in ORGMODE.plugins: ORGMODE.register_plugin(PLUGIN_NAME) self.editcheckbox = ORGMODE.plugins[PLUGIN_NAME] vim.EVALRESULTS = { # no org_todo_keywords for b u'exists("b:org_todo_keywords")'.encode(u'utf-8'): '0'.encode(u'utf-8'), # global values for org_todo_keywords u'exists("g:org_todo_keywords")'.encode(u'utf-8'): '1'.encode(u'utf-8'), u'g:org_todo_keywords'.encode(u'utf-8'): [ u'TODO'.encode(u'utf-8'), u'DONE'.encode(u'utf-8'), u'|'.encode(u'utf-8') ], u'exists("g:org_improve_split_heading")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_improve_split_heading")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("g:org_debug")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_debug")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("*repeat#set()")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'b:changedtick'.encode(u'utf-8'): (u'%d' % counter).encode(u'utf-8'), u'&ts'.encode(u'utf-8'): u'8'.encode(u'utf-8'), u'exists("g:org_tag_column")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_tag_column")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u"v:count".encode(u'utf-8'): u'0'.encode(u'utf-8'), # jump to insert mode after adding heading/checkbox u'exists("g:org_prefer_insert_mode")'.encode(u'utf-8'): u'0'.encode(u'utf-8'), u'exists("b:org_prefer_insert_mode")'.encode(u'utf-8'): u'0'.encode(u'utf-8') } self.c1 = u""" * heading1 [%] - [ ] checkbox1 [/] - [ ] checkbox2 - [ ] checkbox3 - [ ] checkbox4 - [ ] checkbox5 - [ ] checkbox6 - [ ] checkbox7 - [ ] checkbox8 """.split(u'\n') self.c2 = u""" * a checkbox list [%] - checkbox [0%] - [ ] test1 - [ ] test2 - [ ] test3 """.split(u'\n') self.c3 = u""" * heading 1. [ ] another main task [%] - [ ] sub task 1 - [ ] sub task 2 2. [ ] another main task """.split(u'\n') self.c4 = u""" * heading """.split(u'\n') self.c5 = u""" * heading1 1. item 9. item }. item a. item z. item A. item Z. item aa. item """.split("\n")
def setUp(self): if PLUGIN_NAME not in ORGMODE.plugins: ORGMODE.register_plugin(PLUGIN_NAME) self.editcheckbox = ORGMODE.plugins[PLUGIN_NAME] vim.EVALRESULTS = { # no org_todo_keywords for b u_encode(u'exists("b:org_todo_keywords")'): u_encode('0'), # global values for org_todo_keywords u_encode(u'exists("g:org_todo_keywords")'): u_encode('1'), u_encode(u'g:org_todo_keywords'): [u_encode(u'TODO'), u_encode(u'|'), u_encode(u'DONE')], u_encode(u'exists("g:org_improve_split_heading")'): u_encode(u'0'), u_encode(u'exists("b:org_improve_split_heading")'): u_encode(u'0'), u_encode(u'exists("g:org_debug")'): u_encode(u'0'), u_encode(u'exists("b:org_debug")'): u_encode(u'0'), u_encode(u'exists("*repeat#set()")'): u_encode(u'0'), u_encode(u'b:changedtick'): u_encode(u'%d' % counter), u_encode(u'&ts'): u_encode(u'8'), u_encode(u'exists("g:org_tag_column")'): u_encode(u'0'), u_encode(u'exists("b:org_tag_column")'): u_encode(u'0'), u_encode(u"v:count"): u_encode(u'0'), # jump to insert mode after adding heading/checkbox u_encode(u'exists("g:org_prefer_insert_mode")'): u_encode(u'0'), u_encode(u'exists("b:org_prefer_insert_mode")'): u_encode(u'0')} self.c1 = u""" * heading1 [%] - [ ] checkbox1 [/] - [ ] checkbox2 - [ ] checkbox3 - [ ] checkbox4 - [ ] checkbox5 - [ ] checkbox6 - [ ] checkbox7 - [ ] checkbox8 """.split(u'\n') self.c2 = u""" * a checkbox list [%] - checkbox [0%] - [ ] test1 - [ ] test2 - [ ] test3 """.split(u'\n') self.c3 = u""" * heading 1. [ ] another main task [%] - [ ] sub task 1 - [ ] sub task 2 2. [ ] another main task """.split(u'\n') self.c4 = u""" * heading """.split(u'\n') self.c5 = u""" * heading1 1. item 9. item }. item a. item z. item A. item Z. item aa. item """.split("\n")