Added missing files
This commit is contained in:
parent
1d5a81b0c3
commit
b0653645e9
9
PySnippets/all.snippets
Normal file
9
PySnippets/all.snippets
Normal file
@ -0,0 +1,9 @@
|
||||
# This is a comment, don't read it
|
||||
snippet hallo "This is my cool description"
|
||||
Hallo Welt
|
||||
endsnippet
|
||||
|
||||
snippet db
|
||||
debug(${1/ba/arg, /} ${1:args})
|
||||
endsnippet
|
||||
|
9
PySnippets/python.snippets
Normal file
9
PySnippets/python.snippets
Normal file
@ -0,0 +1,9 @@
|
||||
snippet cls
|
||||
class ${1:MyClass}(${2:object}):
|
||||
|
||||
def __init__( self${4/([^,])?(.*)/(?1:, )/}${4:arg} ):
|
||||
"""
|
||||
TODO: Fill me in
|
||||
"""
|
||||
${2/object$|(.+)/(?1:\t\t$0.__init__\(self\)\n\n)/}${4/(\A\s*,\s*\Z)|,?\s*([A-Za-z_][A-Za-z0-9_]*)\s*(=[^,]*)?(,\s*|$)/(?2:\t\tself._$2 = $2\n)/g} $0
|
||||
endsnippet
|
29
plugin/PySnipEmu.vim
Normal file
29
plugin/PySnipEmu.vim
Normal file
@ -0,0 +1,29 @@
|
||||
function! PyVimSnips_ExpandSnippet()
|
||||
py << EOF
|
||||
from PySnipEmu import PySnipSnippets
|
||||
PySnipSnippets.try_expand()
|
||||
EOF
|
||||
|
||||
return ""
|
||||
endfunction
|
||||
|
||||
function! PyVimSnips_JumpBackwards()
|
||||
py << EOF
|
||||
from PySnipEmu import PySnipSnippets
|
||||
PySnipSnippets.try_expand(True)
|
||||
EOF
|
||||
return ""
|
||||
endfunction
|
||||
|
||||
|
||||
" Expand our path
|
||||
python from PySnipEmu import PySnipSnippets
|
||||
|
||||
inoremap <Tab> <C-R>=PyVimSnips_ExpandSnippet()<cr>
|
||||
snoremap <Tab> <Esc>:call PyVimSnips_ExpandSnippet()<cr>
|
||||
inoremap + <C-R>=PyVimSnips_JumpBackwards()<cr>
|
||||
snoremap + <Esc>:call PyVimSnips_JumpBackwards()<cr>
|
||||
|
||||
au CursorMovedI * py PySnipSnippets.cursor_moved()
|
||||
au InsertEnter * py PySnipSnippets.entered_insert_mode()
|
||||
|
Loading…
x
Reference in New Issue
Block a user