bjones1 / CodeChat_Editor

The CodeChat Editor provides an easy-to-use literate programming environment
Other
8 stars 10 forks source link

Welcome to the CodeChat Editor

The CodeChat Editor is a GUI-based programmer's word processor / Jupyter for software developers. This document describes its basic features and use. In contrast, the style guide provides strategies for effectively employing the CodeChat Editor to improve the software development process.

Installation

Install the CodeChat Editor extension for Visual Studio code. For developers, see building from source.

Structure

The CodeChat Editor divides source code into code blocks and documentation (doc) blocks.​ These blocks are separated by newlines; the image below shows the style guide on the left in the Visual Studio Code (VSCode) text editor, while the right pane shows the same text from style guide in the CodeChat Editor (using the VSCode extension). Specifically, this screenshot shows:

Image showing code blocks and doc blocks in Visual Studio Code

See the style guide for more examples.

Editing

Edits may be made either in the IDE hosting the CodeChat Editor, or within the CodeChat Editor window itself. Edits made in one place are transferred to the other after a short delay.

Navigation

Switching documents in the IDE likewise switches the document shown in the CodeChat Editor. Likewise, following hyperlinks in the CodeChat Editor to a local file loads that file in the IDE, as well as showing it in the Editor.

References to other files

The CodeChat Editor supports hyperlinks to any recognized file type; to refer to another source file, simply insert a hyperlink to it. For example, this is a link to docs/style_guide.cpp (the style guide, which is in the docs/ subdirectory); here's a link to LICENSE.md, which is in the same directory as this file. Note that:

  1. Hyperlinks are relative to the current file; to refer to the style guide, use docs/style_guide.cpp.
  2. As usual, the text of a hyperlink does not need to match the link itself; here's another link to the style guide, for example.

Likewise, the path to local images is relative to the current file's location. For example [1]:

Monitor icon

Although the CodeChat Editor allows drag-and-drop of images, the result is a mess -- the image data is embedded directly in the source file. Avoid this; instead, place images in a separate file, then reference them as shown above.

Projects

The CodeChat Editor can either display a single file, or a project. In a project, the table of contents is displayed on the left, while a file within the project is displayed on the right. To create a project, simply place a file named toc.md at the root of your project [2]; its contents define the table of contents. See the new project template for a simple example.

Mathematics

The CodeChat Editor uses MathJax to support typeset mathematics; for example, $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.

Diagrams

Graphviz

The CodeChat Editor contains rudimentary support for diagrams created by Graphviz. For example:

To edit these diagrams, use an HTML entity encoder/decoder and a Graphviz editor such as Edotor.

PlantUML

Sample PlantUML diagram

To edit these diagrams, paste the URL into the PlantUML web server, click Decode URL, edit, then copy and paste the SVG URL back to this file.

Supported languages

Issues and feature requests

Please report issues and provide suggestions for improvement using the Github page for this project. Contributions to the code are welcome and encouraged!

License

Copyright (C) 2022 Bryan A. Jones.

This file is part of the CodeChat Editor.

The CodeChat Editor is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The CodeChat Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the CodeChat Editor. If not, see https://www.gnu.org/licenses/.

Notes

  1. The image used comes from Monitor icons created by prettycons - Flaticon.
  2. Note that the filename for the table of contents is lowercase; while the acronym is TOC, requiring upper-case naming can cause confusion when moving files between case-insensitive filesystems (Windows) and case-sensitive filesystems (Linux/OS X).