1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
amix
2017-09-02 12:43:18 +02:00
parent 3be3af28e5
commit 7fc202ec88
64 changed files with 1659 additions and 525 deletions

View File

@ -292,25 +292,25 @@ endsnippet
snippet createview "Generic Create View" b
class ${1:MODEL_NAME}CreateView(CreateView):
model = ${1:MODEL_NAME}
model = $1
template_name = "${2:TEMPLATE_NAME}"
endsnippet
snippet deleteview "Generic Delete View" b
class ${1:MODEL_NAME}DeleteView(DeleteView):
model = ${1:MODEL_NAME}
model = $1
template_name = "${2:TEMPLATE_NAME}"
endsnippet
snippet detailview "Generic Detail View" b
class ${1:MODEL_NAME}DetailView(DetailView):
model = ${1:MODEL_NAME}
model = $1
template_name = "${2:TEMPLATE_NAME}"
endsnippet
snippet listview "Generic List View" b
class ${1:MODEL_NAME}ListView(ListView):
model = ${1:MODEL_NAME}
model = $1
template_name = "${2:TEMPLATE_NAME}"
endsnippet
@ -345,7 +345,7 @@ endsnippet
snippet updateview "Generic Update View" b
class ${1:MODEL_NAME}UpdateView(UpdateView):
model = ${1:MODEL_NAME}
model = $1
template_name = "${2:TEMPLATE_NAME}"
endsnippet

View File

@ -0,0 +1,9 @@
priority -50
snippet impa "Qualified import"
import ${1:Json.Encode} as ${0:`!p snip.rv = t[1].split(".")[-1]`}
endsnippet
snippet impae "Qualified import with exposing"
import ${1:Json.Encode} as ${2:`!p snip.rv = t[1].split(".")[-1]`} exposing (${0:Value})
endsnippet

View File

@ -7,6 +7,14 @@ priority -50
# The smart snippets use a global options called
# "g:ultisnips_javascript.{option}" which can control the format
# of trailing semicolon, space before function paren, etc.
#
# e.g.
# let g:ultisnips_javascript = {
# \ 'keyword-spacing': 'always',
# \ 'semi': 'never',
# \ 'space-before-function-paren': 'always',
# \ }
global !p
from javascript_snippets import (

View File

@ -3,7 +3,7 @@ priority -50
global !p
def create_table(snip):
# retrieving single line from current string and treat it like tabstops count
placeholders_string = snip.buffer[snip.line].strip().split("x",1)
placeholders_string = snip.buffer[snip.line].strip()[2:].split("x",1)
rows_amount = int(placeholders_string[0])
columns_amount = int(placeholders_string[1])
@ -84,9 +84,8 @@ snippet fnt "Footnote"
[^$1]:${2:Text}
endsnippet
post_jump "create_table(snip)"
pre_expand "create_table(snip)"
snippet "tb(\d+x\d+)" "Customizable table" br
`!p snip.rv = match.group(1)`
endsnippet
# vim:ft=snippets:

View File

@ -302,7 +302,7 @@ endsnippet
snippet "\b(case|sw(itch)?)" "case <variable> when <expression> ... end" r
case ${1:variable}
when ${2:expression}
$0
$0
end
endsnippet
@ -326,4 +326,16 @@ snippet ###
=end
endsnippet
snippet priv "private " m
private
$0
endsnippet
snippet prot "protected" m
protected
$0
endsnippet
# vim: set ts=2 sw=2 expandtab: