From 95787c5def4e1334c460811a5eeb834e3f6cea0e Mon Sep 17 00:00:00 2001 From: ArianaKhit Date: Thu, 12 May 2022 16:13:47 +0300 Subject: [PATCH] improved stops navigation --- main.js | 25 +++++++++++-------------- main.ts | 30 +++++++++++++----------------- manifest.json | 4 ++-- package.json | 2 +- 4 files changed, 27 insertions(+), 34 deletions(-) diff --git a/main.js b/main.js index cbd260d..0a4bf2a 100755 --- a/main.js +++ b/main.js @@ -140,15 +140,16 @@ class TextSnippets extends obsidian.Plugin { } findSnippet(editor, cursorOrig, cursor) { var selectedText = this.getSelectedText(editor); - var wordDelimiters = Array.from(this.settings.wordDelimiters); - var selectedWoSpaces = selectedText.split(' ').join(''); + Array.from(this.settings.wordDelimiters); + '' + selectedText.split(' ').join(''); var newStr = ""; - if (selectedWoSpaces == '' || wordDelimiters.indexOf(selectedWoSpaces[0]) >= 0 && cursorOrig.ch == cursor.ch) { - editor.execCommand('goWordLeft'); - editor.execCommand('goWordLeft'); - selectedText = this.getSelectedText(editor); - var cursor = editor.getCursor('from'); - } + // without this finds next stop everywhere in file + // if (selectedWoSpaces == '' || (selectedWoSpaces.length > 0 && wordDelimiters.indexOf(selectedWoSpaces[0]) >= 0 && cursorOrig.ch == cursor.ch)) { + // editor.execCommand('goWordLeft'); + // editor.execCommand('goWordLeft'); + // selectedText = this.getSelectedText(editor); + // var cursor = editor.getCursor('from'); + // } var i; var snippets = this.settings.snippets; for (i in snippets) { @@ -189,7 +190,6 @@ class TextSnippets extends obsidian.Plugin { return newStr; } insertSnippet(key = '', snippetStartpos = { ch: -1, line: -1 }) { - // new Notice('insert snippet'); let activeLeaf = this.app.workspace.activeLeaf; let editor = activeLeaf.view.sourceMode.cmEditor; // let editor = activeLeaf.view.editor; @@ -214,7 +214,6 @@ class TextSnippets extends obsidian.Plugin { (key == 'Space' && (cursorOrig.ch != endCursor.ch || cursorOrig.line != endCursor.line))) { if (wasSelection == false) { editor.getDoc().setSelection(cursorOrig, cursorOrig); - // new Notice('replace'); } if (key == 'Space') return false; @@ -231,7 +230,6 @@ class TextSnippets extends obsidian.Plugin { if (newStr.indexOf(pasteSymbol) != -1) snippetStartpos = cursor; editor.replaceSelection(newStr); - // new Notice('replaced?'); if (stopFound) { editor.setCursor({ line: cursor.line, @@ -259,7 +257,6 @@ class TextSnippets extends obsidian.Plugin { }); } handleKeyDown(cm, event) { - // new Notice(event.key); if ((event.key == 'Tab' && this.settings.useTab) || (event.code == 'Space' && this.settings.useSpace)) { this.SnippetOnTrigger(event.code, true); } @@ -295,7 +292,7 @@ class TextSnippets extends obsidian.Plugin { } return true; } - return false; + return this.nextStop(); } nextStop() { let activeLeaf = this.app.workspace.activeLeaf; @@ -451,4 +448,4 @@ class TextSnippetsSettingsTab extends obsidian.PluginSettingTab { } module.exports = TextSnippets; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIm1haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueVxyXG5wdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuXHJcblxyXG5USEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiIEFORCBUSEUgQVVUSE9SIERJU0NMQUlNUyBBTEwgV0FSUkFOVElFUyBXSVRIXHJcblJFR0FSRCBUTyBUSElTIFNPRlRXQVJFIElOQ0xVRElORyB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V0dXJuIHN0ZXAoW24sIHZdKTsgfTsgfVxyXG4gICAgZnVuY3Rpb24gc3RlcChvcCkge1xyXG4gICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKFwiR2VuZXJhdG9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9X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mFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8ub3BzLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgb3AgPSBib2R5LmNhbGwodGhpc0FyZywgXyk7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0gZmluYWxseSB7IGYgPSB0ID0gMDsgfVxyXG4gICAgICAgIGlmIChvcFswXSAmIDUpIHRocm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BQVcsQ0FBQzthQUN2QixPQUFPLENBQUMsaUJBQWlCLENBQUM7YUFDMUIsT0FBTyxDQUFDLGdFQUFnRSxDQUFDO2FBQ3pFLFFBQVEsQ0FBQyx5QkFBeUIsQ0FBQztBQUNuQyxhQUFBLFdBQVcsQ0FBQyxDQUFDLElBQUksS0FBSyxJQUFJO2FBQ3pCLGNBQWMsQ0FBQyxFQUFFLENBQUM7YUFDbEIsUUFBUSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLGNBQWMsQ0FBQztBQUM3QyxhQUFBLFFBQVEsQ0FBQyxDQUFPLEtBQUssS0FBSSxTQUFBLENBQUEsSUFBQSxFQUFBLEtBQUEsQ0FBQSxFQUFBLEtBQUEsQ0FBQSxFQUFBLGFBQUE7WUFDekIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsY0FBYyxHQUFHLEtBQUssQ0FBQztBQUM1QyxZQUFBLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxZQUFZLEVBQUUsQ0FBQztTQUNqQyxDQUFBLENBQUMsQ0FDRCxDQUFDO0tBRUg7QUFDRDs7OzsifQ== diff --git a/main.ts b/main.ts index 05c8d99..579912e 100755 --- a/main.ts +++ b/main.ts @@ -2,7 +2,7 @@ import { App, Editor, MarkdownView, - Notice, + // Notice, Plugin, PluginSettingTab, Setting, @@ -124,15 +124,15 @@ export default class TextSnippets extends Plugin { findSnippet(editor : CodeMirror.Editor, cursorOrig : CodeMirror.Position, cursor : CodeMirror.Position) : string { var selectedText = this.getSelectedText(editor); var wordDelimiters = Array.from(this.settings.wordDelimiters); - var selectedWoSpaces = selectedText.split(' ').join(''); + var selectedWoSpaces = '' + selectedText.split(' ').join(''); var newStr = ""; - - if (selectedWoSpaces == '' || wordDelimiters.indexOf(selectedWoSpaces[0]) >= 0 && cursorOrig.ch == cursor.ch) { - editor.execCommand('goWordLeft'); - editor.execCommand('goWordLeft'); - selectedText = this.getSelectedText(editor); - var cursor = editor.getCursor('from'); - } + // without this finds next stop everywhere in file + // if (selectedWoSpaces == '' || (selectedWoSpaces.length > 0 && wordDelimiters.indexOf(selectedWoSpaces[0]) >= 0 && cursorOrig.ch == cursor.ch)) { + // editor.execCommand('goWordLeft'); + // editor.execCommand('goWordLeft'); + // selectedText = this.getSelectedText(editor); + // var cursor = editor.getCursor('from'); + // } var i; var snippets = this.settings.snippets; @@ -180,7 +180,6 @@ export default class TextSnippets extends Plugin { insertSnippet(key : string = '', snippetStartpos : CodeMirror.Position = {ch:-1, line:-1}): boolean { - // new Notice('insert snippet'); let activeLeaf: any = this.app.workspace.activeLeaf; let editor = activeLeaf.view.sourceMode.cmEditor; // let editor = activeLeaf.view.editor; @@ -207,13 +206,12 @@ export default class TextSnippets extends Plugin { (key == 'Space' && (cursorOrig.ch != endCursor.ch || cursorOrig.line != endCursor.line)) ) { if (wasSelection == false) { editor.getDoc().setSelection(cursorOrig, cursorOrig); - // new Notice('replace'); } if (key == 'Space') return false; if (newStr == "") { editor.setCursor(cursorOrig); return this.nextStop(); - } + } } //find end position @@ -223,7 +221,7 @@ export default class TextSnippets extends Plugin { if (newStr.indexOf(pasteSymbol) != -1) snippetStartpos = cursor; editor.replaceSelection(newStr); - // new Notice('replaced?'); + if (stopFound) { editor.setCursor({ @@ -255,8 +253,7 @@ export default class TextSnippets extends Plugin { }); } - handleKeyDown (cm: CodeMirror.Editor, event: KeyboardEvent): void { - // new Notice(event.key); + handleKeyDown (cm: CodeMirror.Editor, event: KeyboardEvent): void { if ((event.key == 'Tab' && this.settings.useTab) || (event.code == 'Space' && this.settings.useSpace)) { this.SnippetOnTrigger(event.code, true); } @@ -278,7 +275,6 @@ export default class TextSnippets extends Plugin { } } } - if (cursorSt.ch >=0 && cursorSt.line >= 0) { //paste text from clipboard var cursorOrig = cm.getCursor(); @@ -297,7 +293,7 @@ export default class TextSnippets extends Plugin { } return true; } - return false; + return this.nextStop(); } nextStop(): boolean { diff --git a/manifest.json b/manifest.json index dc901c4..cad731c 100755 --- a/manifest.json +++ b/manifest.json @@ -1,8 +1,8 @@ { "id": "text-snippets-obsidian", "name": "Text Snippets", - "description": "Allows you to replace text templates for faster typing, create your own.", - "version": "0.1.0", + "description": "Allows you to replace text templates for faster typing, create your own, expand text shortcuts.", + "version": "0.1.1", "author": "Ariana Khitrova", "authorUrl": "", "isDesktopOnly": true, diff --git a/package.json b/package.json index 831c314..bab11ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "text-snippets-obsidian", - "version": "0.0.6", + "version": "0.1.1", "description": "Plugin for using snippets for for faster typing", "main": "main.js", "scripts": {