我刚刚用vundle 安装了jedi-vim我的vim版本是7.3.429.我安装了jedi vi pip
每次我打.或<C-Space>我得到这个错误.
Omni completion (^O^N^P) Pattern not found
Run Code Online (Sandbox Code Playgroud)
当我在这里搜索这个模式时,我找到了一个使用vim-jedi的解决方案.但不幸的是,这与jedi-vim有关.
以下是一些寄存器的输出:
:set omnifunc
omnifunc=jedi#complete
:messages
Messages maintainer: Bram Moolenaar <Bram@vim.org>
"models.py" 31L, 1052C
<emptyline>
Run Code Online (Sandbox Code Playgroud) 您好我正在尝试为Django编写标记系统,但今天我在过滤器或Q对象(django.db.models.Q)中遇到了一个奇怪的行为.
我写了一个函数,将搜索字符串转换为Q对象.下一步是使用这些查询过滤TaggedObject.但不幸的是,我得到了一个奇怪的行为.
当我搜索(id=20)=>
Q: (AND: ('tags__tag__id', 20))
并返回2个ID为1127和132的Taged Objects时
当我搜索(id=4)=>
Q: (AND: ('tags__tag__id', 4))
并且它还返回2个对象,但这次是1180和1127
这是重新设置的SQL查询:
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model"
FROM "django_content_type"
WHERE ("django_content_type"."model" = slogan AND "django_content_type"."app_label" = slogans )
ORDER BY "django_content_type"."name" ASC
SELECT "slogans_slogan"."id", "slogans_slogan"."headline", "slogans_slogan"."text", "slogans_slogan"."author"
FROM "slogans_slogan"
INNER JOIN "htags_objecttagbridge" ON ("slogans_slogan"."id" = "htags_objecttagbridge"."object_id")
WHERE ("htags_objecttagbridge"."tag_id" = 4 AND "htags_objecttagbridge"."content_type_id" = 9 )
LIMIT 21
Run Code Online (Sandbox Code Playgroud)
直到这里一切都很好,但当我做一个更复杂的查询,如(id=4) or (id=20)=>
Q: (OR: ('tags__tag__id', 4), ('tags__tag__id', 20))
然后它返回4(!)对象1180,1127,1127,132
和SQL: …