1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +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:

View File

@ -2,9 +2,11 @@ snippet mod
module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` exposing (${1})
${0}
snippet imp
import ${0:List}
import ${0:Http}
snippet impe
import ${1:List} exposing (${0:map})
import ${1:Html} exposing (${0:..})
snippet impae
import ${1:Json.Encode} as ${2:Encode} exposing (${0:Value})
snippet fn
${1:fn} : ${2:a} -> ${3:a}
$1 ${4} =
@ -49,3 +51,8 @@ snippet ty
snippet tya
type alias ${1:Model} =
${0}
snippet test
test "${1}" <| \_ -> $0
snippet doc
{-| ${0}
-}

View File

@ -103,7 +103,22 @@ snippet spec
spec :: Spec
spec =
describe "${1}" $ do
$0
it "${2}" $
$0
snippet specf
module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` (main, spec) where
import Test.Hspec
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} spec
spec :: Spec
spec =
describe "${1}" $ do
it "${2}" $
$0
snippet desc
describe "${1}" $ do
$0
@ -113,3 +128,5 @@ snippet it
snippet itp
it "${1}" $ property $
$0
snippet sb
\`shouldBe\` $0