def FSearchX(sel = False): if not sel: word = "\<%s\>" % pyvim.current_word() else: word = pyvim.select() word = word.replace("'", "\\'") pyvim.log.error(": %s", word) FSearch(word)
def TagJump(tag = None): global TAG if TAG == None: TAG = class_tag() if not tag: tag = pyvim.current_word() if TAG.find_tag(tag): TAG.jump_tag() try: vim.command('normal zz') except vim.error, e: logging.error(e)
def Tag(tag=None): if not tag: tag = pyvim.current_word() root = pyvim.get_cur_root() if not root: pyvim.echoline('not in project path') return taglist, err = libtag.find_tag(root, tag) if not taglist: pyvim.echoline(err) return frame = TagFrame(taglist) frame.goto()
def FSearch(sel = False): if not sel: word = "\<%s\>" % pyvim.current_word() else: word = pyvim.select() word = word.replace("'", "\\'") pyvim.log.info(">%s", word) filter = '' command, path = context(word, filter) if not command: return f_popen = os.popen(command) lines = f_popen.readlines() if lines: filter_quick( lines, path, command )
def hi_current_word( self ): current = pyvim.current_word(from_vim=False) if current.isspace() or current == '': return -2 if len(current) < 4: return if self.lastword == current: return -1 self.lastword = current mid = self.ids.get(vim.current.buffer) if mid: try: fu = vim.Function("matchdelete")(mid) except: pass fu = vim.Function("matchadd") self.ids[vim.current.buffer] = fu("CurrentWord", "\<%s\>" % current, 11)
def TagJump(): global Tag if Tag == None: Tag = class_tag() tag = pyvim.current_word() Tag.jump(tag)