Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/can-lehmann/editor

A text editor written in Nim
https://github.com/can-lehmann/editor

autocompletion editor linux multiple-cursors nim syntax-highlighting terminal terminal-based text-editor

Last synced: 3 months ago
JSON representation

A text editor written in Nim

Awesome Lists containing this project

README

        

# Editor
A text editor written in Nim.

![Screenshot](screenshot.png)

## Features
- Quick Open
- Multiple Cursors
- Automatic Indentation
- Unicode Support (utf-8)
- Syntax Highlighting
- Multiple Windows
- Autocompletion
- Mouse Support

## Installation
### ncurses Backend
When using the ncurses backend, the development package for
ncurses needs to be installed.

```bash
nim compile -r --opt:speed main.nim
```

### SDL2 Backend
The sdl backend requires the [sdl2 module](https://github.com/nim-lang/sdl2).
You also need to supply your own font which has to be placed in `assets/font.ttf`.

```bash
nim compile -r -o:main-sdl --opt:speed -d:sdl_backend main.nim
```

## Keyboard Bindings
### Window Management
- CtrlP+N+Left/Right/Up/Down: Create new window
- CtrlP+A: Select Application
- CtrlP+Left/Right/Up/Down: Change active window
- AltLeft/Right/Up/Down: Change active window
- CtrlW: Close active window
- CtrlQ: Quit

- F1: Search command

### Editor
- CtrlN: New
- CtrlT: Quick Open
- CtrlS: Save

- CtrlR: Find definition
- CtrlF: Find
- CtrlG: Go to line
- CtrlE: Close active prompt

- CtrlC: Copy
- CtrlX: Cut
- CtrlV: Paste

- F2: Show autocomplete
- Tab: Autocomplete word / Indent
- ShiftTab: Unindent

- CtrlZ: Undo
- CtrlY: Redo
- CtrlO: Jump to matching bracket
- CtrlShiftO: Select bracket

#### Multiple Cursors
- CtrlD: Select next
- ShiftAltUp/Down: New cursor
- Escape: Remove cursors
- CtrlU: Remove last cursor

## License
This project is licensed under the MIT License.
See LICENSE.txt for more details.