RedDiamond is a cross platform compact editor designed for programmers. It was developed using the CopperSpice,
Scintilla, and Lexilla libraries and was written in C++. (Currently only cross Linux platform.)
Originally RedDiamond was a fork of the Diamond editor. The Diamond project began as a replacement for
the Crimson and Emerald Editors, both of these were Windows only programs and are no longer supported. To
some extent it achieved that goal but it used QTextEdit and regular expression syntax highlighting which
made it incredibly slow for large (> 5K line) source files, especially when one edited multiple files at
once.
RedDiamond has abandoned QTextEdit and the regular expression syntax highlighting. It uses CsScintilla
(Scintilla ported to CopperSpice) for the edit widget and Lexilla for syntax highlighting. This makes it
very fast when loading multiple large files in different tabs.
RedDiamond no longer shares DNA with Diamond. It may have some overlapping features but this version of the
project started with the Example programs created as part of the CsScintilla port.
EDT keypad navigation was the original goal of RedDiamond. No PC-based editor does a good job of EDT
keypad editing until now. After the port to CsScintilla many EDT and non-EDT commands were added.

Keys that have a GOLD option have that option listed at the bottom line of the key. Unlike PC editors that
make you hold down <ctrl> <alt> or whatever while hitting other keys, you press and release the GOLD key then
press something else.</alt></ctrl>
When you see a * in the middle of a word below it means only the characters preceeding the * are necessary. You
may choose to enter the entire word or part thereof.
By default when answering EDT prompts you must use the ENTER key from the numeric keypad. The typewriter
return key will just display ^M because original EDT allowed you to search for source line numbers by
entering ^M25320. That would take you to the line starting with 25320 and skip all of the references to line
25320 in the code. All source code had to have line numbers back in the day.
range strings: REST SEL*ECT BEFORE WHOLE .
range numbers: nnn:nnn or nnn THRU nnn **
-------------: ---------------------------
REST cursor position to end of document
BEFORE beginning of document to current cursor position
WHOLE entire document
SEL ECT current selection. The letters after space are optional, most just use SEL
. (period)** current line
nnn:nnn Line numbers nnn through nnn
nnn THRU nnn same function, different syntax
. (period) current line of the target tab
nnn A valid line number
END The end of the file
tabname is the name that is displayed on a tab (or would be if it didn't have ... in the middle trying to make it fit)
Adding this to commands that allow it will send the command to that tab if found. This tab may be in any of the open
windows for RedDiamond.
AUTO -INDENT AUTO -INDENT [/ON/OFF/TOGGLE]
At least one of the switches is required. Controls auto-indent for current buffer/file.
TOGGLE is most useful for those using command recall and editing files where you don't
always want auto-indent turned on, such as in large comment blocks.
COPY COPY [=tabname] [range] TO [=tabname2] [range2] [/DUP*LICATE:n]
First =tabname identifies the source tab. second identifies the destination.
If neither specified copy will happen in current tab.
Lines will be copied above range2 in target buffer. If no range2 then current line.
/DUPLICATE:n will duplicate the copy N times. This is handy if you want to expand a comment block by N lines
DEL ETE DEL ETE [=tabname] [range]
Deletes a range of lines from either the current tab or the optional tabname.
Letters After the space are optional. Most people just use DEL
EX IT EX IT exits the editor
GOTO GOTO [=tabname] lineNumber|TOP|BOT|BEG|END
Much like LIN*E and [GOLD] = only you can goto top or end without knowing the line
HELP Shows the help screen
LIN E Prompts for line number then goes to that line if it exists in current buffer.
The E is optional.
MOVE MOVE [=tabname] [range] TO [=tabname2] [range2]
First =tabname identifies the source tab. Second identifies the destination.
If neither are provided move will happen in current tab.
Lines will be moved above range2 in target buffer. If no range2 current line of current tab.
SAVE Saves current buffer to existing file. Becomes SAVEAS if no file yet assigned to buffer
SAVEAS Synonym for WR*ITE command
SEND TO SENDTO =tabname windowId
Moves tab between windows. You can move any tab to any existing window. If windowID doesn't exist (or you make a typo)
a new window will be created. SENDTO is all one command bu the TO part is optional.
SORT SORT [=tabname] range [/NOCASE] [/COL=nn] [/DESC] [/DUP=DEL|NEW]
Sort text within the given range. /NOCASE = case insensitive sort. /DESC = descending sort
/COL=nnn sorts based on text starting in column nnn instead of beginning of line.
/DUP allows you to DELete any duplicate sort lines or send them to a NEW tab/buffer. By default duplicates are retained
in the current text.
SUBS TITUTE SUBSTITUTE|string-1|string-2| [=tabname] [/Q*UERY] [range]
Replaces string-1 with string-2 in tab for range. Resets search/find options to defaults.
Letters after the space are optional.
WR ITE WRITE filespec [=tabname] [range]
Filespec cannot have spaces! Enclosing in quotes will not work.
Writes range of lines from tabname to file. Letters after the space are optional
These are non-standard GOLD key combinations that various editors have had over the years.
** = ** Goto Line. Saves some keystrokes by skipping [GOLD][7]LINE[ENTER].
** C ** Copy selected text. Because <ctrl>-C is how a user kills a process on many platforms
** I ** Insert File at current location
** U ** Uppercase selected text or current character
** L ** Lowercase selected text or current character
** S ** Save file
** A ** Astyle buffer - This requires you have Artistic Style installed in your current PATH and that you have .astylerc in a location the astyle command will look for it. Editor needs to be able to write to an OS provided TEMP location.</ctrl>
RedDiamond prebuilt binaries are available for Linux in Debian and RPM formats
https://sourceforge.net/projects/reddiamond/
See the project wiki for detailed build instructions.
Diamond
* Barbara Geller
* Ansel Sermersheim
RedDiamond
* Roland Hughes
This application is released under the GPL 2 license. For more information refer to the LICENSE file provided with this
project.
The only additional license restriction is that you cannot use this code to create an editor/IDE supporting any kindof plugin.
Those editors always end up with a massive pile of conflicting and broken plugins many of which can destroy the entire editor.
You need to have all of your functionality compiled in.