GithubHelp home page GithubHelp logo

doytsujin / turbo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from magiblot/turbo

0.0 1.0 0.0 1.58 MB

An experimental text editor based on Scintilla and Turbo Vision.

License: Other

CMake 0.19% C++ 96.65% C 3.16%

turbo's Introduction

Turbo

Turbo is an experimental text editor for the terminal, based on the Scintilla code editing component by Neil Hodgson and the Turbo Vision application framework.

It was created to demonstrate new features in Turbo Vision. In particular, it has served as testing ground for Turbo Vision's Unicode capabilities.

As a text editor, Turbo aims at being intuitive and easy to use. Usability and productivity are its two other major objectives, although it has not got that far yet. And only for being a Turbo Vision application, it offers a vintage look and feel.

Turbo

Downloads

  • Unix systems: you'll have to build Turbo yourself. You may follow the build instructions in the next section.
  • Windows: you can find up-to-date binaries in the Actions page. Click on the first successful workflow (with a green tick) in the list. At the bottom of the workflow page, as long as you have logged in to GitHub, you'll find an Artifacts section with the following files:
    • turbo-x86.zip: 32-bit executable built with MSVC. Windows Vista or later required.
    • turbo-x64.zip: 64-bit executable built with MSVC. x64 Windows Vista or later required.

Building

First of all, you should clone this repository along its submodules with the --recursive option of git clone.

Then, make sure the following dependencies are installed:

  • CMake.
  • A compiler supporting C++17.
  • libncursesw (note the 'w') (Unix only).
  • pkg-config, libxcb (Unix only).

Additionally, you may also want to install these optional dependencies:

  • libmagic for better recognition of file types (Unix only).
  • libgpm for mouse support on the linux console (Linux only).

Turbo can be built with the following commands:

cmake . -DCMAKE_BUILD_TYPE=Release && # Or 'RelWithDebInfo', or 'MinSizeRel', or 'Debug'.
cmake --build .

The above will generate the turbo binary.

Detailed build instructions for Ubuntu 20.04
sudo apt update && sudo apt upgrade
sudo apt install build-essential cmake gettext-base git libgpm-dev libmagic-dev libncursesw5-dev libxcb1-dev pkg-config
git clone --recursive https://github.com/magiblot/turbo.git
cd turbo
cmake . -DCMAKE_BUILD_TYPE=Release
cmake --build . -- -j$(nproc) # Build Turbo.
sudo cp turbo /usr/local/bin/ # Install (optional).
Detailed build instructions for Ubuntu 18.04
sudo apt update && sudo apt upgrade
sudo apt install build-essential cmake g++-8 gettext-base git libgpm-dev libmagic-dev libncursesw5-dev libxcb1-dev pkg-config
git clone --recursive https://github.com/magiblot/turbo.git
cd turbo
CXX=g++-8 cmake . -DCMAKE_BUILD_TYPE=Release
cmake --build . -- -j$(nproc) # Build Turbo.
sudo cp turbo /usr/local/bin/ # Install (optional).

Usage

As said earlier, Turbo has been designed to be intuitive. So you probably already know how to use it!

Some of the default keybindings are:

  • Ctrl+C/Ctrl+Ins: copy.
  • Ctrl+V/Shift+Ins: paste.
  • Ctrl+X/Shift+Del: cut.
  • Ctrl+Z, Ctrl+Y: undo/redo.
  • Tab, Shift+Tab: indent/unindent.
  • Ctrl+A: select all.
  • Shift+Arrow: extend selection.
  • Ctrl+F: find.
  • Ctrl+Back/Alt+Back, Ctrl+Del: erase one word left/right.
  • Ctrl+Left, Ctrl+Right: move one word left/right.
  • Ctrl+Shift+Up, Ctrl+Shift+Down: move selected lines up/down.
  • Ctrl+N: create new document.
  • Ctrl+O: "open file" dialog.
  • Ctrl+S: save document.
  • Ctrl+W: close focused document.
  • F6, Shift+F6: next/previous document (in MRU order).
  • Alt+X: exit the application (I prefer this over Ctrl+Q, which is too close to Ctrl+A and Ctrl+W).

In environments with extended keyboard support (e.g. the Linux console, Windows or Kitty โ‰ฅ 0.20.0), the following key shortcuts may also work:

  • Ctrl+Shift+Z: redo.
  • Ctrl+Tab/Alt+Tab, Ctrl+Shift+Tab/Alt+Shift+Tab: next/previous document (in MRU order).
  • Shift+Enter: find previous (in the "find" text box).

Support for these key combinations may vary among terminal applications, but any issue on this should be reported to Turbo Vision instead.

Features

Scintilla has lots of features, of which Turbo only offers a few. Making more of them available is just a matter of time, so contributions are welcome.

Below is my TO-DO list of features I would like to implement in Turbo:

  • Several files open at the same time.
  • Line numbers.
  • Word wrap.
  • Suspend to shell.
  • Unicode in documents (in particular, UTF-8).
  • Double-width characters.
  • Opening binary files without freaking out.
  • List of open documents in MRU order.
  • Tree view of open documents.
  • Tree view sorted alphabetically.
  • Case-insensitive search.
  • Find as you type.
  • Replace.
  • Go to line.
  • List of recently opened files.
  • Remove trailing whitespaces on save.
  • Ensure newline at end of file.
  • Detect open files modified on disk.
  • Persistent configuration.
  • Keybinding customization.
  • Color scheme customization.
  • Syntax highlighting for some languages (C/C++, Rust, Python, JavaScript, Make, Bash, Ruby, JSON, YAML).
  • Syntax highlighting for the rest of languages supported by Scintilla.
  • Brace match highlighting.
  • VIM input mode.
  • Localization.
  • Unicode in dialog text boxes (this depends on Turbo Vision).
  • True Color support (this depends on Turbo Vision).

turbo's People

Contributors

magiblot avatar

Watchers

 avatar

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.