-
Notifications
You must be signed in to change notification settings - Fork 2
Text Editor
ChromaFiler includes a built-in text editor (called "ChromaText") allowing for quick edits without launching another program. It is intended as a simple replacement for Windows Notepad with a few extra features. (I do not plan to add more advanced features like syntax highlighting).
Most editing features can be accessed through the menu in the toolbar () or by keyboard shortcuts. For the most part it functions very similarly to Notepad, with a couple extra features:
- Auto-indent: When you press Enter on a line starting with some amount of whitespace, that whitespace will be carried over to the next line.
- Indent selection: With multiple lines selected, press Tab to add a tab character to the start of each line, and Shift+Tab to remove a tab from the start of each line.
- Line select: Press Ctrl+L to expand your selection to the entire line(s), allowing quick operations on lines.
- Adjustable tab width: See Settings
ChromaText does not use open/save dialog boxes. All text windows correspond to an existing file (there is no concept of an unsaved file that does not exist on the disk). This file can be manipulated through the Proxy in the window header, including renaming or dragging-and-dropping to another destination. You can also click the parent button to show the file in its containing folder for additional operations, or the delete button in the toolbar to immediately delete the file.
I'm not a fan of open/save boxes as a UI concept, and part of my goal in implementing this text editor was to demonstrate how they can be eliminated.
When you install ChromaFiler, you have the option to install "ChromaText" as a separate shortcut. The text editor is always available within ChromaFiler, but selecting this option will make it behave as its own application, with a separate icon in the taskbar, separate entry in the "Open With" dialog, etc. This can be useful if you want to use ChromaText as a Notepad replacement. It's still a part of ChromaFiler, and you can still click the parent button to get to the containing folder.
If you set any file format to always open with ChromaText, that format will always be displayed using the text editor in ChromaFiler. Alternatively, you can configure the preview handler associations for file types.
Starting ChromaText from the start menu or taskbar will create and open an empty text file on your Desktop named "scratch.txt" (configurable). You can then rename and move this file as described above. This is the easiest way to launch the text editor without an existing file. If a scratch file is closed without saving any changes, it will be automatically deleted.
If ChromaText is already running, shift-click or middle-click its icon in the taskbar to open another scratch file.