-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50e8d80
commit 474158a
Showing
29 changed files
with
1,404 additions
and
1,108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/tmp/ | ||
*.bak | ||
TODO.txt | ||
test.xys | ||
scratch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
[ | ||
{"keys": ["ctrl+enter"], "command": "contextual_help_xys", "context": [{"key": "selector", "operator": "equal", "operand": "source.xys"} ]}, | ||
] | ||
{ | ||
"keys": ["ctrl+enter"], | ||
"command": "contextual_help_xys", | ||
"context": | ||
[ | ||
{ | ||
"key": "selector", | ||
"operator": "equal", | ||
"operand": "source.xys" | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[ | ||
{ | ||
"id": "preferences", | ||
"children": | ||
[ | ||
{ | ||
"caption": "Package Settings", | ||
"id": "package-settings", | ||
"children": | ||
[ | ||
{ | ||
"caption": "XYplorer", | ||
"children": | ||
[ | ||
{ | ||
"command": "open_file", | ||
"args": {"file": "${packages}/XYplorer/Xyplorer.sublime-settings"}, | ||
"caption": "Settings – Default" | ||
}, | ||
{ | ||
"command": "open_file", | ||
"args": {"file": "${packages}/XYplorer/XYplorer.sublime-build"}, | ||
"caption": "Build Settings – Default" | ||
}, | ||
{ | ||
"command": "open_file", | ||
"args": {"file": "${packages}/User/Xyplorer.sublime-settings"}, | ||
"caption": "Settings – User" | ||
}, | ||
{ | ||
"command": "open_file", | ||
"args": {"file": "${packages}/User/XYplorer.sublime-build"}, | ||
"caption": " Build Settings – User" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,50 @@ | ||
XYplorer syntax for Sublime Text | ||
================================ | ||
##XYplorer | ||
*XYplorer support for Sublime Text* | ||
|
||
Installation: | ||
--- | ||
- Copy to \Sublime Text\Data\Packages\XYplorer | ||
- Edit file path in XYplorer.sublime-settings and XYplorer.sublime-build | ||
- This package applies to .xys, .inc, .xyi files | ||
Alternative version: https://github.com/SammaySarkar/XYplorer | ||
|
||
Contextual help: | ||
--- | ||
- Place cursor on any xy-native function such as "replacelist()" > Ctrl+enter will open the corresponding reference in XYplorer help file | ||
- Place cursor on any user-defined function such as "gpc()" > Ctrl+enter (or Goto > Go to definition) will jump to function definition | ||
+ This open included file if necessary. | ||
+ Require files, which contain the function, to be indexed: | ||
+ setting "index_files": true, | ||
+ files, which contain the function, are in a project (Project > Add folder to project => files appear in sidebar) | ||
+ Place cursor on any CommandID such as "#101" > Ctrl+enter will display corresponding command text in statusbar | ||
- ####INSTALL: | ||
+ **With [Package Control](https://packagecontrol.io/)** | ||
- open Command Palette (<kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd>) and pick `Package Control: Add Repository` | ||
- Enter `https://github.com/Binocular222/XYplorer/` as the Repository URL | ||
- Now do `Package Control: Install Package`, search for and install `XYplorer` | ||
+ **Without Package Control** | ||
- Download this repo as [zip](https://github.com/Binocular222/XYplorer/archive/master.zip). | ||
There will be a folder inside the zip. Extract and rename the folder to `XYplorer` and move to ` \Data\Packages\ ` . | ||
- ALTERNATIVELY, and *only if running Sublime Text 3*, zip up *the contents* inside of that `XYplorer` folder, | ||
rename the zip file to XYplorer.sublime-package and paste it to ` \Data\Installed Packages\ ` . | ||
|
||
Snippet: | ||
--- | ||
see tabTrigger in the *.sublime-snippet files: Typing these triggers and press Tab will insert a pre-defined script template. Example: | ||
|
||
+ heredoc | ||
+ nowdoc | ||
+ nowdocalternative | ||
+ feselitems: For each <selitems\> | ||
+ foreach: For each $items\ | ||
+ function: Insert User defined function | ||
- ####SETUP & USAGE: | ||
+ open `Preferences > Package Settings > XYplorer > Settings - User` | ||
+ and save the opened settings file with following content, using correct path to your XYplorer installation folder. | ||
```js | ||
{ | ||
"xypath": "P:\\ath\\to\\XYplorer" | ||
} | ||
``` | ||
+ Do the same with `Preferences > Package Settings > XYplorer > Build Settings - User` and this content. | ||
```js | ||
{ | ||
"cmd": ["P:\\ath\\to\\XYplorer\\XYplorer.exe", "", "/script=$file", "/flg=2"], | ||
"selector": "source.xys" | ||
} | ||
``` | ||
+ the highlighter automatically activates in `*.xys, *.xyi, *.inc` files. | ||
+ **Contextual help** | ||
- CTRL+ENTER activates contextual help. Try it on native commands, Command IDs, control keywords, user-defined functions. | ||
+ Native command or control structures: opens command help | ||
+ Command IDs: associated menu caption is displayed in statusbar | ||
+ UDFs: Go to Definition. (see UDF note below) | ||
+ labels in **sub** and **load**: goto the label. (Work-In-Progress) | ||
- UDF note: add include files to project to use Go to Definition with functions defined in those files. | ||
|
||
Build: | ||
--- | ||
+ Tool > Build (Ctrl+B) will execute current xys file in XYplorer | ||
+ Doing `Tools > Build` will run the current script file in XYplorer. | ||
|
||
Assign XYplorer icon to .xys files in sidebar: | ||
--- | ||
+ Create an XYplorer icon in png format and save to \Data\Packages\Theme - Default\icons\file_type_xys.png | ||
+ Filename must be file_type_xys.png because it's defined in "Icon (xys).tmPreferences" | ||
+ **Tips** | ||
- SubScripts, User-Defined Functions and Namespace declarations are listed in Symbols. | ||
- To assign XYplorer icon to .xys files in sidebar: | ||
- Create an XYplorer icon in png format and save to \Data\Packages\Theme - Default\icons\file_type_xys.png | ||
- The filename must be file_type_xys.png because it's defined in "Icon (xys).tmPreferences" | ||
- an example png icon is supplied with this package. | ||
|
||
*Happy XYScripting!* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<!-- skip native commands as symbols, for a manageable symbol list. --> | ||
<key>name</key> | ||
<string>SymbolsHidden</string> | ||
<key>scope</key> | ||
<string>source.xys entity.name.function.xys, source.xys entity.name.function.CommandID.xys</string> | ||
<key>settings</key> | ||
<dict> | ||
<key>showInSymbolList</key> | ||
<integer>0</integer> | ||
<key>showInIndexedSymbolList</key> | ||
<integer>0</integer> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<!-- index UDFs --> | ||
<key>name</key> | ||
<string>SymbolsNS</string> | ||
<key>scope</key> | ||
<string>source.xys entity.name.section.xys</string> | ||
<key>settings</key> | ||
<dict> | ||
<key>showInSymbolList</key> | ||
<integer>1</integer> | ||
<key>symbolTransformation</key> | ||
<string>/^(.*)$/\1 [namespace]/g</string> <!-- Convert to lower case --> | ||
<key>showInIndexedSymbolList</key> | ||
<string>0</string> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<!-- index labelled scripts --> | ||
<key>name</key> | ||
<string>SymbolsSubScript</string> | ||
<key>scope</key> | ||
<string>source.xys meta.class.scriptcaption.xys</string> | ||
<key>settings</key> | ||
<dict> | ||
<key>showInSymbolList</key> | ||
<integer>1</integer> | ||
<!-- <key>symbolTransformation</key> | ||
<string>/"(\w+)"/\1/g</string> --> <!-- extract caption or label --> | ||
<key>showInIndexedSymbolList</key> | ||
<integer>0</integer> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"cmd": ["E:\\Utilities\\XYplorer\\XYplorer.exe", "", "/script=$file", "/flg=2"], | ||
"cmd": ["C:\\Program Files\\XYplorer\\XYplorer.exe", "", "/script=$file", "/flg=2"], | ||
"selector": "source.xys" | ||
} |
Oops, something went wrong.