This commit is contained in:
Jeff Lance 2021-03-09 23:57:34 +01:00
parent 567e377675
commit 48b3aa529b
20 changed files with 0 additions and 437 deletions

View File

@ -1,18 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Comment",
"shortcut": "",
"tag": [
"%",
"%",
"% •",
"%",
"%"
],
"trigger": ""
}

View File

@ -1,19 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Cours frame",
"shortcut": "",
"tag": [
"% frame",
"\\begin{frame}",
"\t\\ftitre",
"\t",
"\t",
"\\end{frame}"
],
"trigger": ""
}

View File

@ -1,16 +0,0 @@
{
"name" : "Solution" ,
"tag" : [
"% Solution",
"\begin{solution}",
" %<•%>",
"\end{solution}"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+Shift+F6"
}

View File

@ -1,18 +0,0 @@
{
"name" : "Slide de cours" ,
"tag" : [
"% Frame",
"\begin{frame}",
" \ftitre",
" ",
" %<•%>",
"\end{frame}"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+F7"
}

View File

@ -1,13 +0,0 @@
{
"name" : "Vide" ,
"tag" : [
"|\fbox{\phantom{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}}|"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+F9"
}

View File

@ -1,13 +0,0 @@
{
"name" : "Python inline" ,
"tag" : [
"\pythoninline/%<•%>/"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+F10"
}

View File

@ -1,16 +0,0 @@
{
"name" : "Python" ,
"tag" : [
"% code python",
"\begin{python}",
" %<•%>",
"\end{python}"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+F11"
}

View File

@ -1,13 +0,0 @@
{
"name" : "Maths en gras" ,
"tag" : [
"\boldsymbol{%<•%:id:1%>}"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+Shift+B"
}

View File

@ -1,13 +0,0 @@
{
"name" : "bullet" ,
"tag" : [
"\textbullet"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+8"
}

View File

@ -1,14 +0,0 @@
{
"name" : "nom" ,
"tag" : [
"%SCRIPT",
"code"
],
"description" : [
"desc"
],
"abbrev" : "abre" ,
"trigger" : "decl" ,
"menu" : "" ,
"shortcut" : ""
}

View File

@ -1,16 +0,0 @@
{
"name" : "bloc" ,
"tag" : [
"% %<•%:id:1%>",
"\begin{%<•%:id:2%>}",
" %<•%:id:3%>",
"\end{%<•%:id:2%>}"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : ""
}

View File

@ -1,49 +0,0 @@
{
"name" : "Git" ,
"tag" : [
"%SCRIPT",
"choisedialog = UniversalInputDialog([\"Commit\",\"Commit with Push\"],\"Git\",\"choiseGIT\")",
"choisedialog.setWindowTitle(\"Git\")",
"choise = choisedialog.get(\"comment\")",
"if (choisedialog.exec() != null) {",
"if (choisedialog.get(\"choiseGIT\") == \"Commit\") {",
"dialog = new UniversalInputDialog()",
"dialog.setWindowTitle(\"Git commit / push\")",
"dialog.add(\"Committed by TeXstudio\", \"Comment\", \"comment\")",
"dialog.add(true, \"Commit all Files\",\"allfiles\")",
"if (dialog.exec() != null) {",
"comment = dialog.get(\"comment\")",
"if ((dialog.get(\"allfiles\")) == true){",
"buildManager.runCommand(\"git commit -a -m \\"\" + comment + \"\\"\", editor.fileName())",
"}else{",
"buildManager.runCommand(\"git commit \" + editor.fileName() + \" -m \\"\" + comment + \"\\"\", editor.fileName())",
"}",
"}",
"} else if (choisedialog.get(\"choiseGIT\") == \"Commit with Push\") {",
"dialog = new UniversalInputDialog()",
"dialog.setWindowTitle(\"Git commit / push\")",
"dialog.add(\"Committed by TeXstudio\", \"Comment\", \"comment\")",
"dialog.add(\"master\", \"Branch\", \"branch\")",
"dialog.add(true, \"Commit all Files\",\"allfiles\")",
"if (dialog.exec() != null) {",
"comment = dialog.get(\"comment\")",
"branch = dialog.get(\"branch\")",
"if ((dialog.get(\"allfiles\")) == true){",
"buildManager.runCommand(\"git commit -a -m \\"\" + comment + \"\\"\", editor.fileName())",
"}else{",
"buildManager.runCommand(\"git commit \" + editor.fileName() + \" -m \\"\" + comment + \"\\"\", editor.fileName())",
"}",
"buildManager.runCommand(\"git push origin \\"\" + branch +\"\\"\", editor.fileName())",
"}",
"}",
"}",
""
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "Scripts" ,
"shortcut" : ""
}

View File

@ -1,17 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Exercice",
"shortcut": "",
"tag": [
"% exercice",
"\\begin{exercice}",
"",
"\\end{exercice}"
],
"trigger": ""
}

View File

@ -1,107 +0,0 @@
{
"name" : "WakaTime" ,
"tag" : [
"%SCRIPT",
"var utils = {};",
"utils.isValidApiKey = function(key) {",
" if (!key) return false;",
" var re = new RegExp('^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$', 'i');",
" return re.test(key);",
" };",
"utils.urlToPath = function(path) {",
" path = decodeURIComponent(path.toString());",
" if (path.indexOf('file://') == 0)",
" path = path.substring(7);",
" return path;",
"};",
"",
"var VERSION = '1.0.0';",
"var EDITOR_VERSION = app.getVersion();",
"var FREQUENCY = 2;",
"var LAST_FILE = '';",
"var LAST_TIME = null;",
"var WAKATIME_CLI = null; // defined in event handler scope",
"var TRIGGERS = {",
" 2: '?txs-start',",
" 64: '?save-file',",
"};",
"",
"",
"function initialize() {",
" debug('Initializing WakaTime v' + VERSION + '...');",
"}",
"",
"function onSave() {",
" var currentFile = app.getCurrentFileName();",
" if (currentFile) {",
" currentFile = app.getAbsoluteFilePath(currentFile);",
" sendHeartbeat(currentFile, true);",
" }",
"}",
"",
"function sendHeartbeat(file, isWrite) {",
" debug('Sending heartbeat for file:' + file);",
" file = utils.urlToPath(file);",
" var args = [",
" 'wakatime',",
" '--verbose',",
" '--entity',",
" '\\"' + file + '\\"',",
" '--plugin',",
" '\\"texstudio/' + EDITOR_VERSION + ' texstudio-wakatime/' + VERSION + '\\"',",
" ];",
" if (isWrite)",
" args.push('--write');",
" if (typeof cursor !== 'undefined') {",
" args.push('--lineno');",
" args.push(cursor.lineNumber() + 1);",
" var cursorpos = cursorPosition();",
" if (cursorpos != null) {",
" args.push('--cursorpos');",
" args.push(cursorpos);",
" }",
" }",
" ",
" // run wakatime-cli in separate process",
" system(args.join(' '));",
"}",
"",
"function cursorPosition() {",
" if (typeof editor === 'undefined') {",
" return null;",
" }",
" ",
" ",
" var lines = editor.document().textLines();",
" var cursorpos = 0;",
" var lineno = cursor.lineNumber();",
" var currentLine = 0;",
" while (currentLine <= lineno) {",
" if (currentLine == lineno) {",
" cursorpos += cursor.columnNumber();",
" } else {",
" cursorpos += lines[currentLine].length + 1;",
" }",
" currentLine += 1;",
" }",
" return cursorpos;",
"}",
"",
"var trigger = TRIGGERS[triggerId];",
"switch (trigger) {",
" case '?txs-start':",
" initialize();",
" break;",
" case '?save-file':",
" onSave();",
" break;",
"}"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "?txs-start|?save-file" ,
"menu" : "Scripts" ,
"shortcut" : "Ctrl+Shift+F12"
}

View File

@ -1,17 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Questions",
"shortcut": "",
"tag": [
"% questions",
"\\begin{questions}",
"",
"\\end{questions}"
],
"trigger": ""
}

View File

@ -1,17 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Solution",
"shortcut": "",
"tag": [
"% solution",
"\\begin{solution}",
"\t",
"\\end{solution}"
],
"trigger": ""
}

View File

@ -1,14 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Vide",
"shortcut": "",
"tag": [
"|\\fbox{\\phantom{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}}|"
],
"trigger": ""
}

View File

@ -1,14 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Python inline",
"shortcut": "",
"tag": [
"\\pythoninline//"
],
"trigger": ""
}

View File

@ -1,17 +0,0 @@
{
"abbrev": "",
"description": [
""
],
"formatVersion": 1,
"menu": "",
"name": "Python",
"shortcut": "",
"tag": [
"% code python",
"\\begin{python}",
"",
"\\end{python}"
],
"trigger": ""
}

View File

@ -1,16 +0,0 @@
{
"name" : "Questions" ,
"tag" : [
"% Questions",
"\begin{questions}",
" %<•%>",
"\end{questions}"
],
"description" : [
""
],
"abbrev" : "" ,
"trigger" : "" ,
"menu" : "" ,
"shortcut" : "Ctrl+F6"
}