mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 06:27:21 +01:00
add session management
This commit is contained in:
@@ -1,218 +0,0 @@
|
|||||||
priority -50
|
|
||||||
|
|
||||||
# JavaScript versions -- from the TextMate bundle + some additions
|
|
||||||
# for jasmine-jquery matchers
|
|
||||||
#
|
|
||||||
|
|
||||||
snippet des "Describe (js)" b
|
|
||||||
describe('${1:description}', () => {
|
|
||||||
$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet it "it (js)" b
|
|
||||||
it('${1:description}', () => {
|
|
||||||
$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet bef "before each (js)" b
|
|
||||||
beforeEach(() => {
|
|
||||||
$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet aft "after each (js)" b
|
|
||||||
afterEach(() => {
|
|
||||||
$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet befa "before all (js)" b
|
|
||||||
beforeAll(() => {
|
|
||||||
$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet afta "after all (js)" b
|
|
||||||
afterAll(() => {
|
|
||||||
$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet any "any (js)" b
|
|
||||||
jasmine.any($1)
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet anyt "anything (js)" b
|
|
||||||
jasmine.anything()
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet objc "object containing (js)" b
|
|
||||||
jasmine.objectContaining({
|
|
||||||
${VISUAL}$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet arrc "array containing (js)" b
|
|
||||||
jasmine.arrayContaining([${1:value1}]);
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet strm "string matching (js)" b
|
|
||||||
jasmine.stringMatching("${1:matcher}")
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ru "runs (js)" b
|
|
||||||
runs(() => {
|
|
||||||
$0
|
|
||||||
});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet wa "waits (js)" b
|
|
||||||
waits($1);
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ex "expect (js)" b
|
|
||||||
expect(${1:target})$0;
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ee "expect to equal (js)" b
|
|
||||||
expect(${1:target}).toEqual(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet el "expect to be less than (js)" b
|
|
||||||
expect(${1:target}).toBeLessThan(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet eg "expect to be greater than (js)" b
|
|
||||||
expect(${1:target}).toBeGreaterThan(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet eb "expect to be (js)" b
|
|
||||||
expect(${1:target}).toBe(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet em "expect to match (js)" b
|
|
||||||
expect(${1:target}).toMatch(${2:pattern});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet eha "expect to have attribute (js)" b
|
|
||||||
expect(${1:target}).toHaveAttr('${2:attr}'${3:, '${4:value}'});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet et "expect to be truthy (js)" b
|
|
||||||
expect(${1:target}).toBeTruthy();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ef "expect to be falsy (js)" b
|
|
||||||
expect(${1:target}).toBeFalsy();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ed "expect to be defined (js)" b
|
|
||||||
expect(${1:target}).toBeDefined();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet eud "expect to be defined (js)" b
|
|
||||||
expect(${1:target}).toBeUndefined();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet en "expect to be null (js)" b
|
|
||||||
expect(${1:target}).toBeNull();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ec "expect to contain (js)" b
|
|
||||||
expect(${1:target}).toContain(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ev "expect to be visible (js)" b
|
|
||||||
expect(${1:target}).toBeVisible();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet eh "expect to be hidden (js)" b
|
|
||||||
expect(${1:target}).toBeHidden();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notx "expect not (js)" b
|
|
||||||
expect(${1:target}).not$0;
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet note "expect not to equal (js)" b
|
|
||||||
expect(${1:target}).not.toEqual(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notl "expect to not be less than (js)" b
|
|
||||||
expect(${1:target}).not.toBeLessThan(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notg "expect to not be greater than (js)" b
|
|
||||||
expect(${1:target})..not.toBeGreaterThan(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notm "expect not to match (js)" b
|
|
||||||
expect(${1:target}).not.toMatch(${2:pattern});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notha "expect to not have attribute (js)" b
|
|
||||||
expect(${1:target}).not.toHaveAttr('${2:attr}'${3:, '${4:value}'});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet nott "expect not to be truthy (js)" b
|
|
||||||
expect(${1:target}).not.toBeTruthy();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notf "expect not to be falsy (js)" b
|
|
||||||
expect(${1:target}).not.toBeFalsy();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notd "expect not to be defined (js)" b
|
|
||||||
expect(${1:target}).not.toBeDefined();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notn "expect not to be null (js)" b
|
|
||||||
expect(${1:target}).not.toBeNull();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notc "expect not to contain (js)" b
|
|
||||||
expect(${1:target}).not.toContain(${2:value});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet notv "expect not to be visible (js)" b
|
|
||||||
expect(${1:target}).not.toBeVisible();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet noth "expect not to be hidden (js)" b
|
|
||||||
expect(${1:target}).not.toBeHidden();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet s "spy on (js)" b
|
|
||||||
spyOn(${1:object}, '${2:method}')$0;
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet sr "spy on and return (js)" b
|
|
||||||
spyOn(${1:object}, '${2:method}').and.returnValue(${3:arguments});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet st "spy on and throw (js)" b
|
|
||||||
spyOn(${1:object}, '${2:method}').and.throwError(${3:exception});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet sct "spy on and call through (js)" b
|
|
||||||
spyOn(${1:object}, '${2:method}').and.callThrough();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet scf "spy on and call fake (js)" b
|
|
||||||
spyOn(${1:object}, '${2:method}').and.callFake(${3:function});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ethbc "expect to have been called (js)" b
|
|
||||||
expect(${1:target}).toHaveBeenCalled();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet nthbc "expect not to have been called (js)" b
|
|
||||||
expect(${1:target}).not.toHaveBeenCalled();
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ethbcw "expect to have been called with (js)" b
|
|
||||||
expect(${1:target}).toHaveBeenCalledWith(${2:arguments});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
priority -50
|
|
||||||
|
|
||||||
snippet #! "shebang"
|
|
||||||
#!/usr/bin/env node
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet vreq "assign a CommonJS-style module to a var"
|
|
||||||
var ${0:${1/(.+\/)*(\w+)(-|\b|$)(\..+$)?/\u$2/g}} = require('${1}');
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ex "module.exports"
|
|
||||||
module.exports = ${1};
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet hcs "http.createServer"
|
|
||||||
http.createServer(${1}).listen(${2});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ncs "net.createServer"
|
|
||||||
net.createServer(function(${1:socket}){
|
|
||||||
${1}.on('data', function(${3:data}){
|
|
||||||
${4}
|
|
||||||
});
|
|
||||||
${1}.on('end', function(){
|
|
||||||
${5}
|
|
||||||
});
|
|
||||||
}).listen(${6:8124});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet pipe "pipe"
|
|
||||||
pipe(${1:stream})${2}
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
# Express snippets
|
|
||||||
|
|
||||||
snippet eget "express GET"
|
|
||||||
${1:app}.get('${2}', ${3});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet epost "express POST"
|
|
||||||
${1:app}.post('${2}', ${3});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet eput "express PUT"
|
|
||||||
${1:app}.put('${2}', ${3});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet edelete "express DELETE"
|
|
||||||
${1:app}.delete('${2}', ${3});
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
# process snippets
|
|
||||||
|
|
||||||
snippet stdout "stdout"
|
|
||||||
process.stdout
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet stdin "stdin"
|
|
||||||
process.stdin
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet stderr "stderr"
|
|
||||||
process.stderr
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
@@ -1,15 +1,334 @@
|
|||||||
priority -30
|
snippet proto "prototype"
|
||||||
|
${1:class_name}.prototype.${2:method_name} = function(${3}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
};
|
||||||
|
endsnippet
|
||||||
|
|
||||||
# AMD (Asynchronous Module Definition) snippets
|
snippet fun "Function"
|
||||||
|
function ${1:function_name}(${2}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet def "define an AMD module"
|
snippet anf "Anonymous Function" w
|
||||||
define([
|
function(${1}) {
|
||||||
'${1:backbone}'
|
${0:${VISUAL}}
|
||||||
], (
|
}
|
||||||
${2:Backbone}
|
endsnippet
|
||||||
) => {
|
|
||||||
$0
|
snippet vaf "Anonymous Function assigned to constant"
|
||||||
|
const ${1:function_name} = function(${2}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
};
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet vf "Function assigned to constant"
|
||||||
|
const ${1:function_name} = function $1(${2}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
};
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet (f "Immediate function"
|
||||||
|
(function(${1}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}(${2}));
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ;fe "Minify safe iife"
|
||||||
|
;(function(${1}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}(${2}))
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet if "if (condition) { ... }"
|
||||||
|
if (${1:true}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ife "if (condition) { ... } else { ... }"
|
||||||
|
if (${1:true}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
} else {
|
||||||
|
${2}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ter "tertiary conditional"
|
||||||
|
${1:/* condition */} ? ${2:/* if true */} : ${0:/* if false */}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet switch "switch case"
|
||||||
|
switch (${1:expression}) {
|
||||||
|
case '${3:case}':
|
||||||
|
${4}
|
||||||
|
break;
|
||||||
|
${0}
|
||||||
|
default:
|
||||||
|
${2}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet case "case 'xyz': ... break"
|
||||||
|
case '${1:case}':
|
||||||
|
${0:${VISUAL}}
|
||||||
|
break;
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet try "try { ... } catch(e) { ... }"
|
||||||
|
try {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
} catch (${1:e}) {
|
||||||
|
${2:/* handle error */}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet tryf "try { ... } catch(e) { ... } finally { ... }"
|
||||||
|
try {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
} catch (${1:e}) {
|
||||||
|
${2:/* handle error */}
|
||||||
|
} finally {
|
||||||
|
${3:/* be executed regardless of the try / catch result*/}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet terr "throw Error"
|
||||||
|
throw new Error('${1:error message}')
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ret "return"
|
||||||
|
return ${0:result};
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet for "for (...) {...}"
|
||||||
|
for (let ${1:i} = 0, ${2:len} = ${3:Things.length}; $1 < $2; $1++) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet forr "reversed for (...) {...}"
|
||||||
|
for (let ${2:i} = ${1:Things.length} - 1; $2 >= 0; $2--) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet fori "For in loop"
|
||||||
|
for (let ${1:prop} in ${2:object}) {
|
||||||
|
${0:$2[$1]}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet :f "Object Method"
|
||||||
|
${1:method_name}: function (${2:attribute}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
},
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet has "hasOwnProperty"
|
||||||
|
hasOwnProperty(${0})
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet jsonp "JSON.parse"
|
||||||
|
JSON.parse(${0:jstr});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet jsons "JSON.stringify"
|
||||||
|
JSON.stringify(${0:object});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet by. "Elements by class"
|
||||||
|
${1:document}.getElementsByClassName('${0:class}')
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet by# "Element by ID"
|
||||||
|
${1:document}.getElementById('${0:element ID}')
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet qs "Query selector"
|
||||||
|
${1:document}.querySelector('${0:CSS selector}')
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet qsa "Query selector all"
|
||||||
|
${1:document}.querySelectorAll('${0:CSS selector}')
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet de "Debugging"
|
||||||
|
debugger;
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cl "console.log"
|
||||||
|
console.log(${0});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cd "console.debug"
|
||||||
|
console.debug(${0});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ce "console.error"
|
||||||
|
console.error(${0});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cw "console.warn"
|
||||||
|
console.warn(${0});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ci "console.info"
|
||||||
|
console.info(${0});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ct "console.trace"
|
||||||
|
console.trace(${0:label});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ctime "console.time ... console.timeEnd"
|
||||||
|
console.time("${1:label}");
|
||||||
|
${0:${VISUAL}}
|
||||||
|
console.timeEnd("$1");
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ctimestamp "console.timeStamp"
|
||||||
|
console.timeStamp("${1:label}");
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ca "console.assert"
|
||||||
|
console.assert(${1:expression}, ${0:obj});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cclear "console.clear"
|
||||||
|
console.clear();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cdir "console.dir"
|
||||||
|
console.dir(${0:obj});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cdirx "console.dirxml"
|
||||||
|
console.dirxml(${1:object});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cgroup "console.group"
|
||||||
|
console.group("${1:label}");
|
||||||
|
${0:${VISUAL}}
|
||||||
|
console.groupEnd();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cgroupc "console.groupCollapsed"
|
||||||
|
console.groupCollapsed("${1:label}");
|
||||||
|
${0:${VISUAL}}
|
||||||
|
console.groupEnd();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cprof "console.profile"
|
||||||
|
console.profile("${1:label}");
|
||||||
|
${0:${VISUAL}}
|
||||||
|
console.profileEnd();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ctable "console.table"
|
||||||
|
console.table(${1:"${2:value}"});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet us "use strict"
|
||||||
|
'use strict';
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet timeout "setTimeout"
|
||||||
|
setTimeout(function () {${0}}${2}, ${1:10});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet const
|
||||||
|
const ${1} = ${0};
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet let
|
||||||
|
let ${1} = ${0};
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet im "import xyz from 'xyz'"
|
||||||
|
import ${1} from '${2:$1}';
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet imas "import * as xyz from 'xyz'"
|
||||||
|
import * as ${1} from '${2:$1}';
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet imm "import { member } from 'xyz'"
|
||||||
|
import { ${1} } from '${2}';
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ed
|
||||||
|
export default ${0}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cla "define class"
|
||||||
|
class ${1} extends ${2} {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet clac "define class with constructor"
|
||||||
|
class ${1} {
|
||||||
|
constructor(${2}) {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet foro "for (const prop of object}) { ... }"
|
||||||
|
for (const ${1:prop} of ${2:object}) {
|
||||||
|
${0:$1}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet c=>
|
||||||
|
const ${1:function_name} = (${2}) => {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet caf
|
||||||
|
const ${1:function_name} = (${2}) => {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet =>
|
||||||
|
(${1}) => {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet af "Arrow function"
|
||||||
|
(${1}) => {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ${
|
||||||
|
${${1:${VISUAL}}}${0}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet des "Jasmine Describe"
|
||||||
|
describe('$1', () => {
|
||||||
|
${0:${VISUAL}}
|
||||||
});
|
});
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
# vim:ft=snippets:
|
snippet it "Jasmine it"
|
||||||
|
it('$1', () => {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet bef "Jasmine beforeEach"
|
||||||
|
beforeEach('$1', () => {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet aft "Jasmine afterEach"
|
||||||
|
afterEach('$1', () => {
|
||||||
|
${0:${VISUAL}}
|
||||||
|
});
|
||||||
|
endsnippet
|
||||||
|
|||||||
@@ -198,6 +198,11 @@ let g:sessions_dir = '~/.vim/sessions'
|
|||||||
exec 'nnoremap <Leader>ss :mks! ' . g:sessions_dir . '/*.vim<C-D><BS><BS><BS><BS><BS>'
|
exec 'nnoremap <Leader>ss :mks! ' . g:sessions_dir . '/*.vim<C-D><BS><BS><BS><BS><BS>'
|
||||||
exec 'nnoremap <Leader>sr :so ' . g:sessions_dir. '/*.vim<C-D><BS><BS><BS><BS><BS>'
|
exec 'nnoremap <Leader>sr :so ' . g:sessions_dir. '/*.vim<C-D><BS><BS><BS><BS><BS>'
|
||||||
|
|
||||||
|
"" session management
|
||||||
|
let g:sessions_dir = '~/.vim/sessions'
|
||||||
|
exec 'nnoremap <Leader>ss :mks! ' . g:sessions_dir . '/*.vim<C-D><BS><BS><BS><BS><BS>'
|
||||||
|
exec 'nnoremap <Leader>sr :so ' . g:sessions_dir. '/*.vim<C-D><BS><BS><BS><BS><BS>'
|
||||||
|
|
||||||
"" fast editing of the .vimrc
|
"" fast editing of the .vimrc
|
||||||
nnoremap <silent> <leader>ev :e $MYVIMRC<cr>
|
nnoremap <silent> <leader>ev :e $MYVIMRC<cr>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user