Znuny
Znuny is an extension that helps you to make Znuny development easier, faster and more error-free.
Repository |
GitHub |
Visual Studio Marketplace |
|
|
|
|
|
|
|
|
|
|
|
|
Features
Snippets
Znuny code snippets for fast, consistent and error free coding.
Static
Statically created snippets.
- CodePolicy
- ConfigXML
- Customizing
- Debugging
- DynamicFields
- GitLab
- Language
- Licensing
- Needed
- Perl
- POD
- Scaffolding
- Selenium
- SOPM
- VariableCheck
Generated
Snippets created generically using the existing Perl POD.
snippets
│
└───Functions
│ └───ConfigObject
│ │ $ConfigObject->Get()
│ │ $ConfigObject->Set()
│ │
│ └───TicketObject
│ $TicketObject->TicketGet()
│ $TicketObject->TicketSearch()
│ ...
│
└───Modules
│ AgentTicketZoom
│ CustomerTicketOverview
│ ...
│
└───ObjectManager
ConfigObject
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
TicketObject
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');
...
AddFolderToWorkspace
This Function provides a searchable list of folders (Workspaces) that can be added to the current VSC Workspace. All configured folders will be displayed.
Of course, you can use the already built-in function:
`Workspaces: Add Folder To Workspace...` (workbench.action.addRootFolder).
But then you have to click through all the folders again and again.
Shortcut: strg + alt + z, p
Command: Znuny: Add Folder to Workspace.
Settings
Preferences -> Settings -> Extensions -> Znuny
Name |
Description |
Default Value |
znuny.addFolderToWorkspace.workspaces |
Provides a list of folders (Workspaces) that can be added to the current VSC Workspace. |
/Users/ |
znuny.addFolderToWorkspace.recursiveWorkspaces |
Provides a searchable (only first level) list of folders (Workspaces) that can be added to the current VSC Workspace. |
/Users/ |
RemoveFolderFromWorkspace
This Function provides a searchable list of folders (Workspaces) that can be removed simultaneous from the current VSC Workspace. All current open folders are displayed.
Shortcut: strg + alt + z, shift + p
Command: Znuny: Remove Folder from Workspace.
Customizer
This function fetches Znuny files from GitHub and adds origin to header.
# $origin: Znuny - 7775216b80452a6ce2267812a25bf23ae786ae57 - Kernel/System/Ticket.pm
Shortcut: strg + alt + z, c
Command: Znuny: Fetch Znuny files from GitHub.
Opens a project, branch and file selection list to chose a framework or addon file from. The file will get fetched live from the selected GitHub branch and added to the (selected) folder. The origin tag will be added automatically to the file header for you. The file will also be automatically added to the 'Custom/' directory in case it's a file with one of the file extensions '.pm', '.dtl' or '.tt'.
If the copyright is set in the settings, it will be added as well.
The GitHub API is limited to 60 requests per hour for non authorized requests.
If you need more requests, please create an issue on the use of credentials.
The following steps are performed one after the other.
1. Znuny - Customizer (1/5): Fetching GitHub repositories.
This function allows you to search for GitHub owners or GitHub repositories.
The search results (owner/repository) are then displayed.
2. Znuny - Customizer (2/5): Fetching branches.
After selecting the repository, all possible branches are displayed.
3. Znuny - Customizer (3/5): Fetching files.
After that, select the desired file.
4. Znuny - Customizer (4/5): Fetching destination folder.
Finally, the destination folder must be selected.
5. Znuny - Customizer (5/5): Added file.
`Hocus Pocus` - The file was created at the desired location.
Settings
Preferences -> Settings -> Extensions -> Znuny
Name |
Description |
Default Value |
|
|
znuny.customizer.copyright |
Znuny Customizer Copyright. This Copyright will be added to the Customizer file under the Znuny Copyright. |
|
|
|
znuny.customizer.repositories |
List of possible GitHub repositories. |
Znuny |
FAQ |
... |
GenerateFilelist
Inserts the SOPM Filelist content containing all files of a selectable project.
The following file types will be added: pm | tt | t | xml | js | html.tmpl
The function can be executed only in the .sopm
file.
Shortcut: strg + alt + z, f
Command: Znuny: Insert Filelist to SOPM.
Settings
Preferences -> Settings -> Extensions -> Znuny
Name |
Description |
Default Value |
znuny.generateFilelist.mode |
Znuny Generate Filelist Mode is used in GenerateFilelist function. It defines how the file list should be generated.
File => Adds only every single file without <Filelist> . Filelist => Adds the complete filelist with <Filelist> . |
File |
ObjectDependencies
This function inserts the @ObjectDependencies
array by parsing the file content. Only regular used OM (ObjectManager) calls are supported.
Shortcut: strg + alt + z, d
Command: Znuny: Insert @ObjectDependencies.
QuoteWithMarker
This function quotes the selected area and adds a custom marker to it.
QuoteWithMarker
can be very useful especially for custom files Custom/**
.
Shortcut: strg + alt + z, q
Command: Znuny: Quote with Marker.
Works for the following languages:
LanguageID |
LineComment |
bat |
@REM |
clojure |
;; |
coffeescript |
# |
c |
// |
cpp |
// |
cuda-cpp |
// |
csharp |
// |
CSS |
|
dart |
// |
diff |
# |
dockerfile |
# |
fsharp |
// |
git-commit |
# |
git-rebase |
# |
ignore |
# |
go |
// |
groovy |
// |
handlebars |
|
hlsl |
// |
HTML |
|
ini |
; |
plaintext |
# |
java |
// |
javascriptreact |
// |
JavaScript |
// |
jsx-tags |
|
json |
// |
jsonc |
// |
jsonl |
// |
julia |
# |
tex |
% |
latex |
% |
cpp_embedded_latex |
// |
markdown_latex_combined |
|
less |
// |
lua |
-- |
makefile |
# |
Markdown |
|
objective-c |
// |
objective-cpp |
// |
perl |
# |
perl6 |
# |
php |
// |
powershell |
# |
jade |
//- |
python |
# |
r |
# |
razor |
|
restructuredtext |
.. |
ruby |
# |
rust |
// |
SCSS |
// |
shaderlab |
// |
shellscript |
# |
sql |
-- |
swift |
// |
TypeScript |
// |
typescriptreact |
// |
vb |
' |
xml |
|
xsl |
|
dockercompose |
# |
yaml |
# |
Settings
Preferences -> Settings -> Extensions -> Znuny
Name |
Description |
Default Value |
znuny.quoteWithMarker.codeMarker |
Znuny Code Marker used in QuoteWithMarker function. |
Znuny |
StatusBar
The status bar gets an additional Znuny item and the entire status bar is displayed in the Znuny color
if the active file is a "Znuny file".
- If the active file belongs to a Znuny framework ("Znuny file") in the workspace, the product name and version are displayed from the RELEASE file.
- If the active file belongs to a Znuny package ("Znuny file") in the workspace, the vendor and the largest framework version are displayed from the SOPM file.
The status bar is updated with every active file change.
Shortcut: strg + alt + z, v
Command: Znuny: Show Znuny Version.
Settings
Preferences -> Settings -> Extensions -> Znuny
Name |
Description |
Default Value |
znuny.statusBar.enabled |
Defines when the StatusBar should be updated.
On: Always active. On Command: Activated only by a command. On ChangeActiveTextEditor: Activated only by change of active TextEditor. Off: Not active. |
On |
znuny.statusBar.statusBar.background |
Znuny Status Bar background color. |
#ff9b00 |
znuny.statusBar.statusBar.foreground |
Znuny Status Bar foreground color. |
#000000 |
znuny.statusBar.statusBar.foregroundZnuny |
Znuny Status Bar foreground color for Znuny Version Item. |
#ffffff |
znuny.statusBar.statusBarItem.hoverBackground |
Znuny Status Bar hoverBackground color. |
#ffc062 |
Installation
To install this extension, you have three options:
1. Search Extension in Marketplace
Search and install online extension via VSC extensions menu.
Code
-> Preferences
-> Extensions
simply search for Znuny
to install.
2. Install via vsix file
Download latest vsix file and install via extensions menu.
Code
-> Preferences
-> Extensions
-> Views and More Action
-> Install from VSIX
.
3. Source code
Download archive with the latest release and unpack it to VisualStudioCode extensions folder
$HOME/.vscode/extensions/
.
Download
For download see VSCode-Znuny
Enjoy!
Your Denny Korsukéwitz 🚀