UnoCode
A code editor built into UnoDOS, in the shape of Visual Studio Code: files in tabs, a folder tree down the side, search across the whole folder, a terminal at the bottom, and extensions - including colour themes taken straight from VS Code.
You do not need to write software to get something out of UnoCode. It is also simply the best text editor on the machine: it opens any text file, colours it according to what it is, finds and replaces across a whole folder, and remembers how you like it. If you do write software, everything on this page still applies and there is a deeper page for you at the end.
Opening it
UnoCode is in the Start menu and has a desktop icon. Open it the way you open anything else; the first time takes a moment while the app is read off the disk.
It opens on a folder rather than a single file. Use the folder tree on the left to move around, and Enter to open what is selected. To jump straight to a file by name, press Ctrl+P and start typing.
The five keys worth learning
Almost everything in UnoCode has a name, and every name is in one searchable list. If you remember one line from this page, make it the first one.
| Key | What it does |
|---|---|
| Ctrl+Shift+P | The command palette: everything UnoCode can do, searchable by name |
| Ctrl+P | Open a file by typing part of its name |
| Ctrl+S | Save |
| Ctrl+F | Find in this file |
| Ctrl+B | Hide the side panel, to give the text the whole window |
The palette is the way out of every "how do I ...?" moment: open it, type roughly what you want, and read the answers. Each row shows the command's name and, on the right, the key that runs it - so it teaches you the shortcut while you use it.
theme typed into it. The grey text is the command's internal name and the right-hand column is its keyboard shortcut, which is how most people end up learning the shortcuts.Editing
Typing works the way you expect. What UnoCode adds is context: it colours the text according to what kind of file it is, marks the lines you have changed since you opened it, and keeps a map of the whole file down the right-hand edge so you can see where you are in something long.
Useful habits, all of them ordinary editor behaviour done properly:
- Ctrl+Z undoes, Ctrl+Y redoes. A burst of typing undoes as one piece rather than one character at a time.
- Ctrl+D selects the next copy of the word you are on, so you can rename several at once by typing once.
- Home and End go to the ends of the line, Ctrl+Home and Ctrl+End to the ends of the file.
- The status bar along the bottom shows the line and column, how the file is indented, how it is encoded and which line ending it uses. Click nothing: it is there to tell you, and it is the first place to look when a file behaves oddly on another machine.
- Ctrl+Shift+O lists the things in the file - functions, types, headings - and jumps to the one you pick. It is the fastest way around a long file.
- You can split the editor and put two files side by side, or the same file twice at two different places. Each side scrolls on its own. View: Split Editor in the palette.
Finding things
Ctrl+F searches the file you are in and highlights every match at once, with a running count. The three small toggles beside the box control whether case matters, whether it must match a whole word, and whether what you typed is a pattern rather than plain text.
0 of 11 matches and the case, whole-word and pattern toggles. Every match in the file is marked as you type, not just the next one.To search the whole folder rather than one file, use the magnifying glass in the activity bar. It searches into subfolders, a slice at a time so the window stays responsive on a big tree. Results are grouped by file; Enter on one opens the file at that line.
You can replace across every file at once from the same view. Each file that changes is one step of undo, so a replacement that went wrong in one file is undone in that file without disturbing the rest.
Changing the colours
Open the palette and type theme. UnoCode ships with six colour themes, dark and
light, and switching is instant - the whole window recolours, not just the text.
You are not limited to the six. UnoCode reads Visual Studio Code's own theme files, so a theme downloaded for VS Code works here unchanged - see the next section for how to put one on the machine.
Extensions
An extension adds something to UnoCode: a colour theme, support for another kind of file, a set of ready-made snippets, or a new command. The Extensions view - the last icon in the activity bar - lists what is installed, what each one does and whether it is switched on.
Installing one is copying a folder. There is no store and nothing to sign in to:
an extension is a folder containing a package.json file and whatever it adds, and you
install it by putting that folder in UnoCode's EXT folder and pressing
Ctrl+R. Removing it is deleting the folder. Switching one off in the list is
enough if you only want it out of the way for now.
The panel at the bottom
Ctrl+` opens a terminal underneath the editor. It is not a
Unix shell - UnoDOS does not have one - but it lists and changes folders, reads files, searches, opens
and runs things, and reads and writes UnoCode's own settings. help lists what it
knows.
help and ext. It is a quick way to do the things that are fiddly with the mouse, and the fastest way to see which extensions actually loaded.The assistant
The last view in the activity bar is an assistant: a chat panel beside your code that reads the file you have open and can propose changes to it. It is built into the editor rather than being an extension, though extensions can reach a model themselves through an interface UnoCode offers them.
It sends the file you are looking at. Every question carries the whole of the active file with it, rebuilt each time you ask, so an answer is about the file as it stands and not as it was when the conversation started. It is not the folder: the other files are not read, and nothing is sent that you do not have open. A file too large to fit is cut, and the assistant says it was cut.
Two more things about it are deliberate. Every edit it proposes is shown to you as a diff first and applied only when you accept it, as a single step of undo. And it needs a key for whichever model service you use, which is stored in the machine's own secret store rather than in your settings file - AI: Set API Key in the palette, typed into a masked box, and the store it went into is named on screen when it is saved.
Settings
Settings live in a text file, and UnoCode edits it like any other file: open the palette and choose
Preferences: Open Settings. Every setting is a line of the form
"editor.fontSize": 14, comments are allowed, and anything UnoCode does not recognise is
ignored rather than rejected - so a settings file copied from Visual Studio Code works, with the parts
that do not apply here quietly doing nothing.
Keyboard shortcuts work the same way, in their own file, through Preferences: Open Keyboard Shortcuts.
UnoCode or Studio?
UnoDOS has two editors and keeps both on purpose. Studio is the small one: an editor, the built-in compiler and an assistant, three keys from typing something to running it. UnoCode is the big one: more editor, more searching, and extensible. If you are writing a small program and want it running now, use Studio. If you are working through a folder full of files, use UnoCode.
What it does not do
- No printing. Nothing in UnoDOS prints yet.
- No downloading extensions from inside it. There is no marketplace; you copy a folder onto the disk.
- Not every VS Code extension. Themes, languages, grammars and snippets are the real formats and work as they are. Extensions that contain code are written against UnoCode's own smaller set of commands, so a complex VS Code extension will not simply run.
- No debugger. The Run view launches things; it does not step through them.
Writing an extension, or want the file formats and the internals? That is the developer page.