Skip to content

can-lehmann/editor

Repository files navigation

Editor

A text editor written in Nim.

Screenshot

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.

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

SDL2 Backend

The sdl backend requires the sdl2 module. You also need to supply your own font which has to be placed in assets/font.ttf.

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.