Code Monkey home page Code Monkey logo

qe-text-editor's Introduction

QE Text Editor

QE is a simple text editor loosely modelled after IBM's E Editor and Aaron Lawrence's AE. It is written using Qt4 and is therefore reasonably cross-platform.

The philosophy behind QE is to provide a simple tool for quickly reading and/or editing text files. It is not a programmer's editor, word processor, or document manager. As such, it doesn't provide developer features like syntax highlighting, code completion, folding, compiler integration, or anything else that could get in the user's way, clutter up the interface, or cause lengthy load times.

What it does aim to provide is the essentials for viewing and editing plain text. This includes straightforward yet flexible search and replace, a go-to-line feature, basic printing support, the ability to read text files in different encodings, and full support for displaying Unicode text.

More information is available at: https://github.com/altsan/qe-text-editor/wiki

Installation

Manual installation for various platforms is described below. RPM or other installable packages may be available elsewhere.

OS/2

Make sure you have the following runtime packages installed. Most of these are available in zip, WarpIN, and/or yum/rpm distributions:

  • Qt4 runtime version 4.7.3 or later
  • klibc (1:0.1.4) and libgcc (9.2.0)

Copy QE.EXE to a directory in your PATH, and QE.HLP to a directory in your HELP path. Create a program object for QE.EXE if you wish.

Windows

Create a directory for QE and copy QE.EXE into it. Create a shortcut for QE.EXE.

If you do not have the Qt4 and GCC/MingW 4.8.2 runtime libraries installed, you must also extract the contents of qe_win32-mingw-qt4_libs.zip either into the same directory, or to a directory on your PATH.

To enable online help support, copy QE.QCH and QE.QHC into the same directory as QE.EXE. If you do not have Qt installed system-wide, you must also extract the contents of qe_win32-mingw-qt4_assistant.zip either into the same directory, or to a directory on your PATH.

Linux

Make sure the Qt4 and gcc runtime libraries are installed (using your distribution's package manager), along with QtAssistant if you want online help support.

Copy qe into a pathed directory (such as /usr/local/bin), along with qe.qch and qe.qhc if you want online help support.

Building from Source

GCC, GNU Make, and the Qt4 development libraries for your platform are required. As long as these are all installed correctly, building the executable should be as simple as running qmake qe.pro followed by make (or make release under Windows, if you are building the non-debug version).

Building the help is somewhat more complicated. The help file source is in IBM IPF format. Under OS/2 this is compiled to HLP using the IPFC compiler: run ipfc qe.ipf from inside the help subdirectory.

However, on Windows and Linux the help must be converted to QtAssistant format, which involves converting the IPF file to HTML and then running qcollectiongenerator. The script makehtml.cmd performs the first part of this task; it is written in REXX and has been confirmed to work with classic REXX under OS/2, and Regina REXX under Windows. It also requires the SED utility (GNU sed or the equivalent) and GNU iconv to run. This script runs qe.ipf through the SED script ipfhtml.sed, converts the encoding to UTF-8, splits the resulting output into single-section HTML files, and ensures that any IPF links are converted to the proper URIs. Once this is done, you will have a series of qe.*.html files; running qcollectiongenerator qe.qhcp -o qe.qhc should then generate the final QtAssistant help files.

To compile the message files, if required, run lrelease qe.pro (if the Qt4 binaries are not in your path, you may have to prefix the command with the path to the appropriate directory, e.g. /usr/lib/qt4/bin).

Translation

Message file sources for various languages are in the language/ subdirectory. These can be translated using QtLinguist or a text editor. To make sure the files are in sync with the latest English sources before translating, run lupdate qe.pro (see the note above about the path to the Qt4 binaries).

All message files should use UTF-8 encoding.

Help file source in help/ should also be translated. Copy qe.ipf to either qe_xx.ipf or qe_xx_yy.ipf (where 'xx' is the two-letter ISO code for your language, and 'yy' is the two-letter code for a particular country or region) and use your preferred text or INF editor to translate the contents.

Unlike message files, translated IPF files should use the native OS/2 codepage for the target language (this is CP850 for most Latin languages).

You will also need to translate the files qe.qhp and qe.qhcp to update the titles and keywords. These two files should be UTF-8 encoded.

See 'Building from Source' (above) for help file build instructions.

Notices

QE Text Editor
Copyright (C) 2018-2022 Alexander Taylor

A few routines were derived from examples in "C++ GUI Programming with Qt4" (Second Edition) by Jasmin Blanchette & Mark Summerfield.

OS/2 version includes the public domain "EAString" module by Roger Orr.

OS/2 native file dialog code is derived in part from the Mozilla for OS/2 project.

This program 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.

This program 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 this program. If not, see http://www.gnu.org/licenses/.

qe-text-editor's People

Contributors

altsan avatar alex-free avatar

Stargazers

 avatar  avatar Martin Iturbide avatar

Watchers

James Cloos avatar  avatar  avatar Vadim "Oxyd" Priluzkiy avatar

Forkers

os2world

qe-text-editor's Issues

When creating a new document, Read-only mode should be unset automatically

I was reading a document the integrity of which I wanted to ensure, so I set the Read-only option from the menu. When I was done, I wanted to paste clipboard content into the editor to create a new document, so I selected File | New. I was then unable to paste because I was still in Read-only mode.

Suggest that when Read-only mode has been toggled, Ctrl-N (or File | New) should unset Read-only to allow creating a new document.

Suggestions

I am using beta version 0.9.6:

first things first: I like it and it does what it promises ! In particular, it can load files where e.exe, e2.exe and epm.exe crash on load.

Here are a couple of suggestions. None of these are critical:

  1. I know this editor is not meant to load binary or large (?) files. Doing so nonetheless leads to an exception (not always ...) which is seemingly caught before it hits the OS (which of course is good). I suggest to show a dialog box from the exception handler that the file could not be loaded due to this and that (wrong encoding, out of memory, etc. etc.) ...
  2. It would be helpful to load the file from a secondary thread. I currently have to handle a 32 MB text file. While it loads just fine, the application is completely frozen while loading with the main window not repainting.
  3. a little more info in the status bar would be helpful, like "loading file ..." and such. Of course that might only work if 2) is in place.

RFE: More configurable Find & Replace dialog behavior

It would be nice if:

  • The Confirm replacement checkbox was not always selected, requiring me to uncheck it 90% of the time before performing a find & replace.
  • The entire Find & Replace dialog did not disappear after performing a Replace all operation, as I often need to perform several of these form the top of the file.

I would suggest either an added checkbox for the second item: Keep this dialog open, and for both, simply remembering the last used settings. So, if I open Find & Replace and uncheck Confirm replacement (and leave it unchecked or the reset of my session), the next time I start the program and open the dialog, the box should remember that it was unchecked and not require me to repeat that operation. The same behavior would inure to the benefit of the suggested Keep this dialog open checkbox (just remember how it was last set).

These suggestions would then obviate the need for any type of additional options dialog.

Enable configurable bindings for mouse actions

Apparently, the Qt4 widget enables block marking and dragging via mouse. Dragging is currently bound to the left mouse button, which for OS/2 is counter-intuitive. This RFE would be to allow either configurable mouse button bindings or to bind the right mouse button for dragging on OS/2.

Selected printer is not retained throughout the program session

Raising the Print dialog and selecting a given printer (or file output option), printing, and raising the Print dialog again returns to the default CUPS printer.

It would be expected (I think) that the selected printer or file output option be preserved for the entire program session (or perhaps just that document), even if not retained between sessions.

Replace history dropdown does not retain strings of only whitespace

Testing with 0.9.8, my find history will retain strings consisting of only whitespace (regardless the number of spaces), whereas the dropdown for the replacement seems to discard these.

Example:

Find: abcde

Replace with:      

(five spaces, to preserve indent). The next time the Replace dialog is opened, the five spaces will not be listed in the replacement history dropdown. However, if the goal is the reverse:

Find:       

Replace with: abcde

the five spaces are consistently listed in the find history dropdown (as expected).

Add support for marking columns of text

Currently, block marking is line-based, so beginning to mark a block in a table, for example, will wrap from the starting column to the first column of text on the next line, whether formatted as a table or not. This RFE would allow using a modifier key for the left mouse button to allow marking a particular column (or group of columns) instead of words or lines.

When editing text, backslash shouldbe recognized as path (or word) separator

When editing text which includes a URI, Ctrl-Right or Ctrl-Left will move from one part of the path to another. However, when editing text which includes a DOS, Windows, or OS/2 filesystem path which uses backslashes as directory separators, these are skipped, and the entire path (unless a dot is encountered) is treated as a single word. This makes editing batch files somewhat cumbersome.

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.