Giter VIP home page Giter VIP logo

aleksandrhovhannisyan / scribe-text-editor Goto Github PK

View Code? Open in Web Editor NEW
40.0 2.0 7.0 1.44 MB

Rich text editor developed with the Qt framework. Supports standard file operations, syntax highlighting, multiple tabs, undo/redo, find & replace, brace matching, and more.

License: GNU General Public License v3.0

QMake 2.10% C 0.32% C++ 97.58%
cpp qt5 qtcreator text-editor desktop-application qt5-gui qt qt-gui windows-app

scribe-text-editor's Introduction

Scribe

A simple, user-friendly text editor.

Tips for how to take advantage of Scribe's keyboard shortcuts.

Basic syntax highlighting for four languages: C, C++, Java, and Python.

Syntax highlighting in Scribe.

Demo

Here's a look at some of the app's functionality and UIs:

Development

This project was developed in Qt5 using Qt Creator.

All code is written in C++ using the Qt framework and its libraries.

To contribute your own code to the project:

  1. Fork the repository here on Github.
  2. Clone your fork using HTTP or SSH via the command-line.
  3. Push your feature branch to your forked repo, and then submit a pull request.

Credits

All application icons are open source. Credit goes to Feather Icons, created by Cole Bemis. (I colored them in for this app, though.)

The code for highlighting the current line and numbering the margins on the left was borrowed from the official Qt Code Editor Example tutorial. All other code is original.

scribe-text-editor's People

Contributors

aleksandrhovhannisyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scribe-text-editor's Issues

Extract metric reporting labels and their associated update methods out of MainWindow and into a MetricReporter class.

MainWindow should have a MetricReporter that's installed as a permanent widget on the status bar, as opposed to labels that are each individually set up and permanently added to the status bar.

MetricReporter will own all the labels necessary for word/char/line/col reporting.

MetricReporter should also have its own update slots for each label. MainWindow will then simply interface between the current editor and the MetricReporter and won't have to care about updating those stats manually.

This should hopefully make the code in MainWindow a little cleaner and more compact, as it will delegate all that "management" business to a helper class that it will then own.

Fix brace matching issue/bug.

Brace matching does not work as intended. If a new brace is inserted between existing code blocks, then the algorithm effectively breaks and doesn't work as intended. Find a workaround.

For example, suppose the document is currently empty. We enter an opening brace, and the expectation is that a closing brace will automatically be inserted. This works as intended:

image

However, now let's suppose we already have an existing pair of braces like the ones above, and we try to insert an opening brace on line 1 (having moved the existing pair down a couple lines). This is what happens:

image

The brace-matching algorithm is a bit flawed. See handleKeyPress in Editor.cpp.

Move Highlighter dependency from MainWindow to Editor.

It does not make sense for MainWindow to have a syntax highlighter. Rather, each tab/editor should have its own syntax highlighter. It should also manage the generation and garbage collection of syntax highlighters internally, without MainWindow having to worry about that logic.

All that MainWindow should do is:

  1. Tell the Editor what language the user wants to set, if any.
  2. On tab change, simply update the menu language option to reflect the new tab's option; don't worry about the highlighter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.