XYS Syntax Highlighting/Autocomplete for Notepad++

Discuss and share scripts and script files...
Post Reply
Raf
Posts: 150
Joined: 31 Jul 2024 15:34

XYS Syntax Highlighting/Autocomplete for Notepad++

Post by Raf »

Write code with beautiful syntax highlighting, launch scripts and translate comments directly from Notepad++. Download here or read about manual customization.

Auto-completion and code snippets
Type any keyword, e.g. if too see it's special expansion (code snippet/template).
snippets.gif
Press Tab to insert code snippet; press Ctrl+L to move caret to the next placholder (e.g. inside if { } block).
Auto-completion allows you to write commands and functions in PascalCase, making your code readable.

Code: Select all

GetPathComponent
OpenCommandPrompt
Include_Once
IndexAtPos
Documentation popup and function parameters help
Hover your mouse on function/keyword to see documentation popup; click on it to open next page.
calltips.gif
format.gif
Type ( after function name or press Ctrl+Shift+O to see calltip (function parameters hint); Ctrl+J - next page, Ctrl+U - previous page.
Array.gif
foreach.gif
You don't have to memorize default values anymore! Now you can see what each function does if you omit specific parameters:

Code: Select all

{Integer} Explode($array, ItemList, [separator='|'], [flag (e)])
{List} ExtList(type, [list (?|'')], [switches (a|r)])
{String} ExtractText([file=<curitem>], [bitness=64], [flag (1)])
{String} ExtraTag([id {ex}(1-16)|CurColumnCaption], [definition|caption])
{List} Favs([type=d (d|f)], [list], [separator=<crlf>], [action='a' (a|aa|p|pp|s|d)])
{Integer}FilesEqual([file1=<curitem>], [file2=<curitemprev>], [hash='md5' (md5|crc32|sha1|sha256|sha512)])
{Integer} FileSize([file=<curitem>])
The functions return different values, which have been divided into categories (types) for convenience:
  • {Bool} - true or false
  • {Integer} - Integer value, literal (e.g. Asc)
  • {String} - Something inside quotes " or ' (e.g. GetPathComponent)
  • {List} - A string containing elements separated by a character. You may have seen the lists in the help file (e.g. Caption|Data|Icon from InputSelect example)
  • {Date} - Date (and time) string. Depends on format, e.g. "yyyy-mm-dd hh:nn:ss" from DatePicker
  • {Void} - Returns nothing (just performs some actions like any command)
Curly braces { } are only needed to visually separate the type from the function name. You may encounter other types like {Char} or {Array} that are specific to individual functions.

The commands do not return a value ({Void} type), but you can still see their default parameters:

Code: Select all

Goto [location], [reuseexistingtab (0|1)]
Gsm [index]
Hash([algo='md5' (md5|crc32|sha1|sha256|sha512)], [string], [flags (0|1|2|4)])
HashList([algo='md5' (md5|crc32|sha1|sha256|sha512)], [filelist])
Help [page]
Hex([integer], [rlen=0])
Both auto-completion and docs popup can display undocumented and deprecated commands.

Offline documentation search in xyplorer.chm
Select any keyword/function/command to see it's official documentation from bundled help file.
help.gif
To see the attached files, you need to log into the forum.

Raf
Posts: 150
Joined: 31 Jul 2024 15:34

Re: XYS Syntax Highlighting/Autocomplete for Notepad++

Post by Raf »

Other Features
Run script
Press "Run" button or Ctrl+Shift+S shortcut. Add step; command in your script to debug it.
run.png
run2.gif
Create .reg file:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_USERS\_CURRENT\Software\Classes\Applications\XYplorer.exe\shell\open\command]
@="\"C:\\Users\\ToYu\\XYplorer\\XYplorer.exe\" /feed=|::load \"%1\";|"
Make sure that there's correct path to your xyplorer.exe. Merge it. This is necessary to run scripts.
Reboot your system.
Context menu actions
  • Translate selected text, get alternative translation variants.
    translate.gif
  • Add separators with text (Alt+Z to comment the line).
    separator.gif
  • Align text vertically (Alt+X).
    align.gif
  • Change text case.
  • Find magic number: CLSID, shell::: or any variable like %AppData%, etc.
Re-designed search/replace dialog
Bigger font, bigger buttons, more readable query with monospace font.
find2.png
find1.png
Shortcuts:
  • Ctrl+F - find in file
  • Ctrl+R - replace in file
  • Ctrl+Shift+F - find in files. Specify *.xys after the filter icon to search in your scripts. Check Follow cur to search in current folder and sub-folders. Un-check to preserve current path for future queries.
Press Ctrl+E to search for all calls of the function under caret.
find_usages.gif
To see the attached files, you need to log into the forum.

Raf
Posts: 150
Joined: 31 Jul 2024 15:34

Re: XYS Syntax Highlighting/Autocomplete for Notepad++

Post by Raf »

Syntax Highlighting
Syntax highlighting is designed so that the most important things are bright and slightly contrasting.
syntax.png
args.png
args2.png
Negation, break, end, unstep, error, crash are bright red.
break.png
return, step and continue are bright cyan to see the control flow.
return.png
Operators and comments are dark do not distract from code reading.
operators.png
Other syntax contains pastel colors, which are not too contrasting and allow identifiers and variables to be distinguished.

Download here or read about manual customization.
To see the attached files, you need to log into the forum.

Post Reply