my personal defined snipps doesn't work
I don't know why it happend. I have come throngh the doc file and everything seems ok.
it work fine first with the system snippets. But the system snippets seem ugly. So I redefine some snippets. But find it doesnot work. I try to change the snippets file's position,but it still doesnot work. After all tries, I open a python file, enter the insert mode, press <f7> I can only see the system snippets but not my own. I have search the bugs list find not help. I do not think this is bug. So I am here to ask for some help.
this is what my conf
1) this is my conf:
" 使用python2.7
let g:UltiSnipsUseP
" how window is opened
let g:UltiSnipsEdit
" 定义私有Snips目录
let g:UltiSnipsSnip
" 定义按键
let g:UltiSnipsExpa
let g:UltiSnipsList
let g:UltiSnipsJump
let g:UltiSnipsJump
and this is my personal snippet dirs:
daipeng@
snippets/:
total 12
drwxrwxr-x 3 daipeng vboxusers 4096 Jul 17 17:43 ./
drwxrwxr-x 15 daipeng vboxusers 4096 Jul 15 17:56 ../
drwxr-xr-x 3 daipeng vboxusers 4096 Jul 17 17:23 ultisnips/
snippets/ultisnips:
total 20
drwxr-xr-x 3 daipeng vboxusers 4096 Jul 17 17:23 ./
drwxrwxr-x 3 daipeng vboxusers 4096 Jul 17 17:43 ../
-rw-r--r-- 1 daipeng vboxusers 41 Jul 17 16:59 all.snippets
drwxr-xr-x 2 daipeng vboxusers 4096 Jul 17 17:21 python/
-rw-r--r-- 1 daipeng vboxusers 775 Jul 17 17:23 python.snippets
snippets/
total 12
drwxr-xr-x 2 daipeng vboxusers 4096 Jul 17 17:21 ./
drwxr-xr-x 3 daipeng vboxusers 4096 Jul 17 17:23 ../
-rw-r--r-- 1 daipeng vboxusers 775 Jul 17 17:21 python.snippets
then this is my own snippets file:
daipeng@
# hd
snippet hd "header for python scripts" !b
#!/user/bin/env python
# encoding: utf-8
${0}
endsnippet
# def
snippet def "def func with docstrings" !
def ${1:func}
""" ${3:docstrings for ${1}} """
${0:pass}
endsnippet
snippet defs "def func(self,) with doc" !
def ${1:func}(self, ${2:argv}):
""" ${3:docstrings for ${1}}"""
${0:pass}
endsnippet
snippet defc "def func(cls,) with doc" !
def ${1:func}(cls, ${2:argv}):
""" ${3:docstrings for ${1}}"""
${0:pass}
endsnippet
# class
snippet class "class with docstrings" !b
class ${1:MyC}
"""
${3:docstring for ${1}}
"""
${0:pass}
endsnippet
# sqlalchemy
# others
snippet init "def __init__()"
def __init__(self${1:, argv}):
${0:pass}
endsnippet
hope you help. thanks at first
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- hackrole
- Solved:
- Last query:
- Last reply: