V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
wklken
V2EX  ›  Python

有用 YCM 做 Python 补全的么?求教个问题

  •  
  •   wklken · 2014-02-17 19:05:11 +08:00 · 3859 次点击
    这是一个创建于 3718 天前的主题,其中的信息可能已经有所发展或是发生改变。
    YCM用了一年多
    有个问题一致没搞明白其到底支不支持
    -----------------

    dir1/
    |- dir2/
    |- a.py

    b.py

    -----------------
    假设dir在PYTHONPYTHON里面
    a.py里面有很多函数
    假设为 hello(), hero(), haha()

    现在b.py中

    from dir1.dir2.dir3 import a

    a.

    这里,YCM支不支持补全a中的函数名,支持的话如何配置>_<

    附配置:
    "在注释输入中也能补全
    let g:ycm_complete_in_comments = 1
    "在字符串输入中也能补全
    let g:ycm_complete_in_strings = 1
    "注释和字符串中的文字也会被收入补全
    let g:ycm_collect_identifiers_from_comments_and_strings = 1
    "语言关键字补全, 不过python关键字都很短,所以,需要的自己打开
    "let g:ycm_seed_identifiers_with_syntax=1
    1 条回复    1970-01-01 08:00:00 +08:00
    tioover
        1
    tioover  
       2014-02-18 20:50:19 +08:00
    应该支持,不过像这个帖子 http://www.v2ex.com/t/100162#reply17 回复里面讨论的一样,你这个是语法补全的范畴,默认不会主动弹出,所以必须手动除法补全快捷键,默认的快捷键和输入法冲突,你改一下试试
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1032 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 19:22 · PVG 03:22 · LAX 12:22 · JFK 15:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.