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

Added not added new plugin files

This commit is contained in:
amix
2017-11-24 14:59:41 +01:00
parent e9aac9794b
commit 99a31080d1
42 changed files with 6063 additions and 0 deletions

View File

@ -0,0 +1,5 @@
priority -50
snippet impq "Qualified import"
import qualified ${1:Data.Text} as ${0:`!p snip.rv = t[1].split(".")[-1]`}
endsnippet

View File

@ -0,0 +1,340 @@
##############################################################################
# Robot Framework Snippets for UltiSnips #
##############################################################################
priority -50
######################
# Built In library #
######################
snippet cat "Catenate"
Catenate SEPARATOR=${1:---} ${2:Hello} ${3:world}
endsnippet
snippet eval "Evaluate"
\${${1:val}}= Evaluate ${2:${x} - 10}
endsnippet
snippet for "FOR loop" b
:FOR ${${1:element}} IN ${2:@{ELEMENTS}}
\ ${0:${VISUAL:Start Element}} ${$1}
endsnippet
snippet nop "No Operation"
No Operation
endsnippet
snippet rfk "Return From Keyword"
Return From Keyword ${1:${optional return value}}
endsnippet
snippet rfki "Return From Keyword If"
Return From Keyword If ${1:${condition}} ${2:${optional return value}}
endsnippet
snippet rk "Run Keyword"
Run Keyword ${1:${kw}} ${2:${args}}
endsnippet
snippet rkacof "Run Keyword And Continue On Failure"
Run Keyword And Continue On Failure ${1:${kw}} ${2:${args}}
endsnippet
snippet rkaee "Run Keyword And Expect Error"
Run Keyword And Expect Error ${1:My error} ${2:${kw}} ${3:${args}}
endsnippet
snippet rkaie "Run Keyword And Ignore Error"
Run Keyword And Ignore Error ${1:${kw}} ${2:${args}}
\${${3:result}} \${${4:return_value}}= Run Keyword And Ignore Error ${1:${kw}} ${2:${args}}
endsnippet
snippet rkar "Run Keyword And Return"
Run Keyword And Return ${1:${kw}} ${2:${args}}
endsnippet
snippet rkari "Run Keyword And Return If"
Run Keyword And Return If ${1:{condition}} ${2:${kw}} ${3:${args}}
endsnippet
snippet rkars "Run Keyword And Return Status"
\${${3:result}}= Run Keyword And Return Status ${1:${kw}} ${2:${args}}
endsnippet
snippet rki "Run Keyword If"
Run Keyword If ${1:${rc} < 0} ${2:${VISUAL:Some keyword returning a value}}
... ELSE IF ${3:'${str}' == 'abc'} ${4:Another keyword}
... ELSE ${5:Final keyword}
endsnippet
snippet rkiactf "Run Keyword If Any Critical Tests Failed"
Run Keyword If Any Critical Tests Failed ${1:${kw}} ${2:${args}}
endsnippet
snippet rkiactp "Run Keyword If All Critical Tests Passed"
Run Keyword If All Critical Tests Passed ${1:${kw}} ${2:${args}}
endsnippet
snippet rkiatf "Run Keyword If Any Tests Failed"
Run Keyword If Any Tests Failed ${1:${kw}} ${2:${args}}
endsnippet
snippet rkiatp "Run Keyword If All Tests Passed"
Run Keyword If All Tests Passed ${1:${kw}} ${2:${args}}
endsnippet
snippet rkitf "Run Keyword If Test Failed"
Run Keyword If Test Failed ${1:${kw}} ${2:${args}}
endsnippet
snippet rkitp "Run Keyword If Test Passed"
Run Keyword If Test Passed ${1:${kw}} ${2:${args}}
endsnippet
snippet rkito "Run Keyword If Timeout Occurred"
Run Keyword If Timeout Occurred ${1:${kw}} ${2:${args}}
endsnippet
snippet rks "Run Keywords"
Run Keywords
... ${1:${VISUAL:Initialize database $\{DB NAME\}}} AND
... ${2:Clear logs}
endsnippet
snippet rku "Run Keyword Unless"
Run Keyword Unless ${1:${condition}} ${2:${kw}} ${3:${args}}
endsnippet
snippet sgv "Set Global Variable"
Set Global Variable \${${1:name}} ${2:${value}}
endsnippet
snippet sleep "Sleep"
Sleep ${1:2 minutes 10 seconds}
endsnippet
snippet ssv "Set Suite Variable"
Set Suite Variable \${${1:name}} ${2:${value}}
endsnippet
snippet stv "Set Test Variable"
Set Test Variable \${${1:name}} ${2:${value}}
endsnippet
snippet sv "Set Variable"
\${${1:name}}= Set Variable ${2:${value}}
endsnippet
snippet svi "Set Variable If"
\${${1:var}}= Set Variable If ${2:${condition}} ${3:${value true}} ${4:${value false}}
endsnippet
snippet wuks "Wait Until Keyword Succeeds"
Wait Until Keyword Succeeds ${1:10x} ${2:2s} ${3:${VISUAL:Some Keyword}}
endsnippet
#####################
# Dialogs library #
#####################
snippet pause "Pause test execution"
Import library Dialogs
Pause execution
endsnippet
##############################
# Selenium2Library library #
##############################
snippet cps "Capture Page Screenshot"
Capture Page Screenshot ${1:${optional filename}}
endsnippet
snippet esbd "Element Should Be Disabled"
Element Should Be Disabled \${${1:locator}}
endsnippet
snippet esbe "Element Should Be Enabled"
Element Should Be Enabled ${${1:locator}}
endsnippet
snippet esbf "Element Should Be Focused"
Element Should Be Focused ${${1:locator}}
endsnippet
snippet esbv "Element Should Be Visible"
Element Should Be Visible ${${1:locator}} ${2:${optional message}}
endsnippet
snippet esc "Element Should Contain"
Element Should Contain ${${1:locator}} ${2:${expected}} ${3:${optional message}}
endsnippet
snippet esnbv "Element Should Not Be Visible"
Element Should Not Be Visible ${${1:locator}} ${2:${optional message}}
endsnippet
snippet esnc "Element Should Not Contain"
Element Should Not Contain ${${1:locator}} ${2:${expected}} ${3:${optional message}}
endsnippet
snippet etsb "Element Text Should Be"
Element Text Should Be ${${1:locator}} ${2:${expected}} ${3:${optional message}}
endsnippet
snippet eaj "Execute Async Javascript"
Execute Async Javascript ${1:${code line 1}} ${2:${code line 2}}
endsnippet
snippet ej "Execute Javascript"
Execute Javascript ${1:${code line 1}} ${2:${code line 2}}
endsnippet
snippet gwp "Get Window Position"
\${${1:x}} \${${2:y}}= Get Window Position
endsnippet
snippet gws "Get Window Size"
\${${1:width}} \${${2:height}}= Get Window Size
endsnippet
snippet mbw "Maximize Browser Window"
Maximize Browser Window
endsnippet
snippet md "Mouse Down"
Mouse Down ${${1:locator}}
endsnippet
snippet mdoi "Mouse Down On Image"
Mouse Down On Image ${1:${locator}}
endsnippet
snippet mdol "Mouse Down On Link"
Mouse Down On Link ${1:${locator}}
endsnippet
snippet mout "Mouse Out"
Mouse Out ${1:${locator}}
endsnippet
snippet mover "Mouse Over"
Mouse Over ${1:${locator}}
endsnippet
snippet mu "Mouse Up"
Mouse Up ${1:${locator}}
endsnippet
snippet ob "Open Browser"
Open Browser ${1:${url}} ${2:${browser=firefox}} ${3:${alias=None}} ${4:${remote_url=False}} ${5:${desired_capabilities=None}} ${6:${ff_profile_dir=None}}
endsnippet
snippet ocm "Open Context Menu"
Open Context Menu ${1:${locator}}
endsnippet
snippet psc "Page Should Contain"
Page Should Contain ${1:${text}} ${2:loglevel=INFO}
endsnippet
snippet pscb "Page Should Contain Button"
Page Should Contain Button ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet pscc "Page Should Contain Checkbox"
Page Should Contain Checkbox ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psce "Page Should Contain Element"
Page Should Contain Element ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psci "Page Should Contain Image"
Page Should Contain Image ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet pscl "Page Should Contain Link"
Page Should Contain Link ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet pscrb "Page Should Contain Radio Button"
Page Should Contain Radio Button ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psct "Page Should Contain Textfield"
Page Should Contain Textfield ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psnc "Page Should Not Contain"
Page Should Not Contain ${1:${text}} ${2:loglevel=INFO}
endsnippet
snippet psncb "Page Should Not Contain Button"
Page Should Not Contain Button ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psncc "Page Should Not Contain Checkbox"
Page Should Not Contain Checkbox ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psnce "Page Should Not Contain Element"
Page Should Not Contain Element ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psnci "Page Should Not Contain Image"
Page Should Not Contain Image ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psncl "Page Should Not Contain Link"
Page Should Not Contain Link ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psncrb "Page Should Not Contain Radio Button"
Page Should Not Contain Radio Button ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet psnct "Page Should Not Contain Textfield"
Page Should Not Contain Textfield ${1:${locator}} ${2:${message=}} ${3:loglevel=INFO}
endsnippet
snippet rktrof "Register Keyword To Run On Failure"
Register Keyword To Run On Failure ${1:${kw}}
endsnippet
snippet wuec "Wait Until Element Contains"
Wait Until Element Contains ${1:${locator}} ${2:${text}} ${3:${timeout=None}} ${4:${error=None}}
endsnippet
snippet wuednc "Wait Until Element Does Not Contain"
Wait Until Element Does Not Contain ${1:${locator}} ${2:${text}} ${3:${timeout=None}} ${4:${error=None}}
endsnippet
snippet wueie "Wait Until Element Is Enabled"
Wait Until Element Is Enabled ${1:${locator}} ${2:${timeout=None}} ${3:${error=None}}
endsnippet
snippet wueinv "Wait Until Element Is Not Visible"
Wait Until Element Is Not Visible ${1:${locator}} ${2:${timeout=None}} ${3:${error=None}}
endsnippet
snippet wueiv "Wait Until Element Is Visible"
Wait Until Element Is Visible ${1:${locator}} ${2:${timeout=None}} ${3:${error=None}}
endsnippet
snippet wupc "Wait Until Page Contains"
Wait Until Page Contains ${1:${text}} ${2:${timeout=None}} ${3:${error=None}}
endsnippet
snippet wupce "Wait Until Page Contains Element"
Wait Until Page Contains Element ${1:${locator}} ${2:${timeout=None}} ${3:${error=None}}
endsnippet
snippet wupdnc "Wait Until Page Does Not Contain"
Wait Until Page Does Not Contain ${1:${text}} ${2:${timeout=None}} ${3:${error=None}}
endsnippet
snippet wupdnce "Wait Until Page Does Not Contain Element"
Wait Until Page Does Not Contain Element ${1:${locator}} ${2:${timeout=None}} ${3:${error=None}}
endsnippet

View File

@ -0,0 +1,205 @@
snippet sapmlabel
var $1 = new sap.m.Label({
design : $2,
text : $3,
visible : $4,
textAlign : $5,
textDirection : $6,
width : $7,
required : $7
});
snippet sapmtext
var $1 = new sap.m.Text({
text :$2,
textDirection :$3,
visible :$4,
wrapping : $5,
textAlign : $6,
width :$7,
maxLines :$8
});
snippet sapmbutton
var $1 = new sap.m.Button({
text : $2,
type : $3,
width : $4,
enabled :$5,
visible :$6,
icon : $7,
iconFirst : $8,
activeIcon :$9,
iconDensityAware : $10,
});
snippet sapmflexbox
var $1 = new sap.m.FlexBox({
visible : $2,
height : $3,
width : $4,
displayInline :$5,
direction :$6,
fitContainer : $7,
renderType : $8,
justifyContent :$9,
alignItems : $10,
items:[]
});
snippet sapmhbox
var $1 = new sap.m.HBox({
visible : $2,
height : $3,
width : $4,
displayInline :$5,
direction :$6,
fitContainer : $7,
renderType : $8,
justifyContent :$9,
alignItems : $10,
items:[]
});
snippet sapmvbox
var $1 = new sap.m.VBox({
visible : $2,
height : $3,
width : $4,
displayInline :$5,
direction :$6,
fitContainer : $7,
renderType : $8,
justifyContent :$9,
alignItems : $10,
items:[]
});
snippet sapcomponent
sap.ui.controller("$1", {
onInit: function(){
},
onAfterRendering: function() {
},
onAfterRendering: function() {
},
onExit: function() {
},
});
snippet sapminput
var $1 = new sap.m.Input({
value :$2,
width : $3,
enabled :$4,
visible :$5,
valueState :$6,
name : $7,
placeholder : $8,
editable : $9,
type : $10,
maxLength :$11,
valueStateText :$12,
showValueStateMessage :$13,
dateFormat :$14,
showValueHelp :$15,
showSuggestion :$16,
valueHelpOnly :$17,
filterSuggests :$18,
maxSuggestionWidth :$19,
startSuggestion : $20,
showTableSuggestionValueHelp : $21,
description : $22,
fieldWidth : $23,
valueLiveUpdate :$24,
suggestionItems :[$25],
suggestionColumns : [$26],
suggestionRows : [$27],
liveChange : $28,
valueHelpRequest :$29,
suggest : $30,
suggestionItemSelected : $31
});
snippet _sthis
var _self = this;
snippet sapmresponsivepopup
var $1 = new sap.m.ResponsivePopover({
placement :$2 ,//sap.m.PlacementType (default: sap.m.PlacementType.Right)
showHeader :$3 ,//boolean (default: true)
title : $4,//string
icon :$5 ,//sap.ui.core.URI
modal :$6 ,// boolean
offsetX :$7, //int
offsetY :$8, //int
contentWidth : $9,//sap.ui.core.CSSSize
contentHeight :$10, //sap.ui.core.CSSSize
horizontalScrolling :$11, //boolean
verticalScrolling :$12, //boolean
showCloseButton :$13, //boolean (default: true)
//Aggregations
content :$14, //sap.ui.core.Control[]
customHeader :$15, //sap.m.IBar
subHeader : $16, //sap.m.IBar
beginButton :$17, //sap.m.Button
endButton : $18, //sap.m.Button
//Associations
initialFocus : $19, //string | sap.ui.core.Control
//Events
beforeOpen :$20, //fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
afterOpen : $21, //fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
beforeClose : $22, //fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
afterClose : $23 //fnList
});
snippet sapicon
var $1 = new sap.ui.core.Icon({
src :$2 , //sap.ui.core.URI
size :$3 , //sap.ui.core.CSSSize
color :$4 , //sap.ui.core.CSSColor
hoverColor : $5 , // sap.ui.core.CSSColor
activeColor :$6 , //sap.ui.core.CSSColor
width :$7 , //sap.ui.core.CSSSize
height : $8 ,//sap.ui.core.CSSSize
backgroundColor :$8 , //sap.ui.core.CSSColor
hoverBackgroundColor :$9 , //sap.ui.core.CSSColor
activeBackgroundColor :$10 , //sap.ui.core.CSSColor
visible :$11 , //boolean (default: true)
decorative : $12 ,//boolean (default: true)
});
snippet extendVerticalL
sap.ui.layout.VerticalLayout.extend("$1", {
metadata: {
properties: {
$2
},
aggregations: {
$3
},
events: {
$4
}
},
init: function(){
$5
},
renderer: "$6"
});
snippet extendHorizontalL
sap.ui.layout.HorizontalLayout.extend("$1", {
metadata: {
properties: {
$2
},
aggregations: {
$3
},
events: {
$4
}
},
init: function(){
$5
},
renderer: "$6"
});

View File

@ -0,0 +1,38 @@
snippet doc
/*
${0}
*/
snippet let
let ${1} = ${0};
snippet fn
let ${1} => {
${0}
};
snippet fn0
let ${1} () => {
${0}
};
snippet fun
fun ${1} => ${0}
snippet ty
type ${1} = ${1};
snippet mod
module ${1} = {
${0}
};
snippet modty
module type ${1} = {
${0}
};
snippet sw
switch ${1} {
| ${2} => ${0}
}
snippet |
| ${1} => ${0}
snippet if
if (${1}) {
${2}
} else {
${0}
}