text_objects.py 文件源码

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

项目:NeoVintageous 作者: NeoVintageous 项目源码 文件源码
def find_line_text_object(view, s):
    """Implement the line object."""
    line = view.line(s)
    line_content = view.substr(line)

    begin = line.begin()
    end = line.end()

    whitespace_match = re.match("\s+", line_content)
    if whitespace_match:
        begin = begin + len(whitespace_match.group(0))

    return (begin, end)


# TODO: Move this to units.py.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号