Editor Features - uCodeEditor

Open uCodeEditor

Two ways can archive this:

  1. Via Tools -> uCodeEditor -> uCodeEditor
  2. Open any script files will open uCodeEditor if it’s not opened

Open File In uCodeEditor

Beside double click a script file in Project Window, below action will open file in uCodeEditor too:

  1. Via right-click dropdown context menu item Open in uCodeEditor in Project Window
  2. Double click the script references in Componment inside Inspector
  3. Click the Open... button in Inspector
  4. Use Go to File... command to open a file
  5. Use Open File... command to oepn a file

Command Palette

Command Palette provides access to many commands. From here, you have acess for most of functionality of uCodeEditor. Press F1 will open Command Palette.

Go To File

Two way can open the Go To File dialog:

  1. Press ⌘; on macOS or Ctrl+; on window
  2. Press F1 to open Command Paletee and execute the command Go To File

An then select one of the drop down item and will the file directly.

UI Actions

For the icons button in below image show, from left to right is

  • Refresh: Sync with Project, it will save all files and trigger an recompile. Shortcut is ⌘R on macOS and Ctrl+Alt+R on Windows
  • Thunder: Open Command Palette. Shortcut is F1
  • Save: Save current opened document. Shortcut is ⌘K on macOS and Ctrl+K on Windows
  • More: Hover or click will open drop down menu
    • New: Create new document. Shortcut is ⌘J on macOS and Ctrl+J on Windows
    • Ping: Ping current opened document in Unity Project Window. Shortcut is ⌘L on macOS and Ctrl+L on Windows
    • Close Tab: Close current opened document. Shortcut is ⌘W on macOS and Ctrl+W on Windows
    • Close All Tab: Close all tabs in tablist
    • Save All: Save all documents which has changes
    • Settings…: Open Settings Window Dialog
    • About: Show about information and versions.

Minimap

A Minimap (outline view) gives you a high level overview of your source code which is very useful for quick navigation and code understanding.

minimap.png

Indent Guides

The image below shows indentation guides (vertical lines) which help you quickly see matching indent levels.

ident-guide

Folding

Move mouse to the area close to line numbers, Folding outline will show. We can click icon to fold/unfold content of code.

Region

uCode also supports region for C# and Shaderlab.

  • C#: using #region / #endregion
  • Shaderlab: using //region / //endregion or //#region / //#endregion

Markdown Preview

Two ways to preview markdown:

  1. Execute Toggle Markdown Preview command
  2. Click the Eye icon at the right side of status bar

Tabs Navigation

Currently we can navigate to a tab item by using shortcuts only. The shortcut is ⌘Tab or ⇧⌘Tab macOS and CTRL + F11 or CTRL + SHIFT + F11 on Windows. The shortcuts are not support customization for now.