Name | Modified | Size | Downloads / Week |
---|---|---|---|
RPMs | 2024-05-03 | ||
Debians | 2024-04-28 | ||
AppImages | 2024-04-27 | ||
README.md | 2023-02-25 | 13.1 kB | |
EDT-keypad-text.png | 2022-06-16 | 26.4 kB | |
EDT-KEYPAD.txt | 2022-06-16 | 798 Bytes | |
Totals: 6 Items | 40.3 kB | 0 |
RedDiamond
Introduction
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.
Key Features
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.
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.
Some command data definitions:
Range
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
Range2
. (period) current line of the target tab nnn A valid line number END The end of the file
=tabname
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.
Commands
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
Non-standard GOLD Keys
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.
other features
- View multiple documents in movable tabs
- Auto Load previously open Files
- Search and Replace
- Sorting
- Cache directory with auto-save timer so buffers without files can be restored on open
- Advanced Find
- Syntax Highlighting based on File Type
- Themes
- Configure to enable backups on every save so you can roll back in time
- Multiple edit windows
- Ability to SEND tab from one window to another or a new window
Building
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.
Documentation
Authors
Diamond * Barbara Geller * Ansel Sermersheim
RedDiamond * Roland Hughes
License
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.
References
Versions
0.000.001
First cut at Debian
0.0-2
Fixed icon in Fedora and Debian. Cleaned up .desktop file that worked under Debian but not Fedora. Added build support for including separate .reddiamond_theme files.
0.1-1
Added support for directly using individual .reddiamond_theme files. You will need to delete your ~/.config/RedDiamond directory as previous config file will not be compatible.
2.0-1
Much more polished editor with fantastic EDT support. Much of the information that used to be stored in slow JSON files has been moved to SQLite database. For some of the values one would want to change between project configs a QSettings INI file is used. Application is now a singleton that supports multiple main windows. Tabs can be transfered to other windows.
3.0.0
Major enhancements after replacing QPlainTextEdit with CsScintilla for core edit widget. This gave much more robust editing experience and dramatic speed improvement for syntax hilighting. Really too many enhancements to list.
3.2.0
- fixed - Escaping out of save or file-Open or save-as leads to backup error messages and a bogus file name on tab. Could be bad.
- fixed - SUBS||some-text| SEL seems to hang null string for a real string seems to cause problems
- fixed - if window is closed before exit getting bogus position and size info
- fixed - extra windows not saving correct screen position
- fixed - annoying tab click not giving editor focus
- fixed - Pascal keywords 1 & 3 are the same???
- fixed - better color for TODO type comments in Classic theme.
- fixed - odd spacing error with tabs and fonts. Can still happen with different fonts on same line.
- fixed - sort not clearing prompt active flag
- fixed - CMakeLists.txt in src dir needs to add headers to sources.
- fixed - bug where style foreground text not cleared when color set in Themes dialog
- fixed - send-to should not leave all text selected
- fixed - send-to should not flag tab as needing save if did not need save in previous window
- fixed - close all files for all windows not removing them from CURRENT_FILES.
- added - SQL default syntax
- added - theme export/import
- added - syntax export/import
- added - EDT command recall
- added - bottom/top commands - updated help text
- added - LINE number|BOT|TOP|END|BEG - updated help text
- added - printing color, B&W, selection
- added - print preview color, B&W
- added - label for indentation guides
- added - rudimentary code folding for C/C++. Others will come with lexer and theme release.
- added - per document line wrap - wrap state survives restart.
- added - Ability to mark tab as "Read-Only". Setting also survives restart of application
- added - text wrap capability that survives application restart.
- added - save-as/choose/create config file
3.5:
- fixed - clicking on backup should open READ-ONLY tab
- fixed - resizing of window when trying to open a file that is already in a tab
- fixed - selection color for all themes for when selected text is no longer in current window.
- fixed - File-New does not set lexer
- fixed - still having trouble with dirty indicator for copied tab. Doesn't work properly until after save. Doesn't seem to be all of the time though.
- fixed - sendTo new window not saving current line position
- upgraded - Lexilla to 5.2.0
- upgraded - CsScintilla to Scintilla 5.3.2
- added - splash screen for database creation - leave up until verified
- added - EDT keypad images from Jim Yuzwalk
- added - non-modal dialog with large image from Jim that can print
- added - QFileInfoList to cpp syntax
- added - tool to let user purge backups
- added - Solarized theme family
- added - THEME_INDICATORS table to database.
- moved - FOUND_ highlight colors from THEME_ATTRIBUTES to new table as INDICATOR_FOUND.
- added - INDICATOR_SPELLING_ERROR, INDICATOR_MATCH_BRACE, INDICATOR_BAD_BRACE as well. Allow user to select squiggle underline, box, etc.
- added - export/import of THEME_INDICATORS
- added - printer dialog option to turn off line numbers, control document color and line wrap
- added - checkboxes to print options to include header/footer
- added - defaults pulled in from settings for print dialog
- added - optional header and footer to printed documents
3.5.8:
- In Git this is actually the version-3.6 branch - minor oops
- pulled in latest CopperSpice compiler changes
- fixed some format issues with appimage-3-5-1.json
- pulled Lexilla source into code base - we now build and ship libRedLex as part of reddiamond
- CopperSpice and CsScintilla no longer bundled with Debian/RPM. Require them pre-installed.
- We now have a proper Debian package where reddiamond is in /usr/bin
- Default sqlite database shipped with product and copied at first run to improve performance
- Any properly formatted .reddiamond-syntax file found in /usr/share/reddiamond/syntax will be imported at startup if the syntax isn't already in database.
- Any properly formatted .reddiamond-theme found in /usr/share/reddiamond/themes will be imported at startup if it isn't already in the database. We no longer programatically generate the default themes at first run.
- Added - [GOLD]-M Jump to matching feature.