12-03-2014, 07:43 PM
Something I've been working on the past few days. It's now on the server.
Light theme:
[attachment=126]
Dark theme:
[attachment=125]
This new editor is using the Ace code editor loading directly from the server. I find Ace is a much better editor than the E2 editor from wiremod (which is what SF is using currently). It also has plenty of themes so you can have it syntax highlight with the colours you want. Another advantage is I have added Starfall specific highlighting for object methods/library functions.
You can also share files to a server hosted folder for collaboration/releases.
Hopefully this will make developing SF a much better experience and allow people to share code much quicker.
Known bugs:
Console commands
Keyboard shortcuts
The editor is heavily reliant on keyboard shortcuts. There's no right click menu like the old E2 editor.
For a full list of the editor's shortcuts, see here: https://github.com/ajaxorg/ace/wiki/Defa...-Shortcuts
Light theme:
[attachment=126]
Dark theme:
[attachment=125]
This new editor is using the Ace code editor loading directly from the server. I find Ace is a much better editor than the E2 editor from wiremod (which is what SF is using currently). It also has plenty of themes so you can have it syntax highlight with the colours you want. Another advantage is I have added Starfall specific highlighting for object methods/library functions.
You can also share files to a server hosted folder for collaboration/releases.
Hopefully this will make developing SF a much better experience and allow people to share code much quicker.
Known bugs:
- None! Please report any you find.
Console commands
- sf_editor_fontsize - Sets the font size to use, default is 16.
- sf_editor_autosaveinterval - Sets how often, in seconds, to auto save files. Default is 120 (every 2 minutes).
- sf_editor_reset - Resets all settings back to default.
Keyboard shortcuts
The editor is heavily reliant on keyboard shortcuts. There's no right click menu like the old E2 editor.
- Ctrl + Z - Undo
- Ctrl + Y - Redo
- Ctrl + F - Find
- Ctrl + H - Find and replace
- Ctrl + S - Save
- Ctrl + N - New file
- Tab - When selecting multiple rows, will indent all of them.
- Shift + Tab - When selecting multiple rows, will remove an indent from all of them.
- Ctrl + / - Toggle commenting of all selected rows.
- Ctrl + L - Opens the command bar.
- Type :<num> to go to line <num>, e.g :100 goes to line 100.
- Type @<functionname> to search the current tab's code for the given function (like Sublime Text's command palette).
- Type !<command> to run commands such as !save, !new etc.
- Type #<searchstring> for a quick find in the current file. Hit enter to go to the next result.
- If you start typing without a symbol at the start, it will search your local directory for matching files.
- Type :<num> to go to line <num>, e.g :100 goes to line 100.
For a full list of the editor's shortcuts, see here: https://github.com/ajaxorg/ace/wiki/Defa...-Shortcuts