vi_actions.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:NeoVintageous 作者: NeoVintageous 项目源码 文件源码
def find_matches(self, prefix, end):
        escaped = re.escape(prefix)
        matches = []
        while end > 0:
            match = search.reverse_search(self.view,
                                          r'^\s*{0}'.format(escaped),
                                          0, end, flags=0)
            if (match is None) or (len(matches) == self.MAX_MATCHES):
                break
            line = self.view.line(match.begin())
            end = line.begin()
            text = self.view.substr(line).lstrip()
            if text not in matches:
                matches.append(text)
        return matches
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号