# ScratchPad
A text editor I'm developing for personal use as well as getting used to 2D and UI development with Vulkan. It currently only supports Linux due to being built for X11 and x86_64 due to inline assembler usage but will eventually be corrected.

Building requires ldc2/dub/vulkan SDK/glslc/freetype to be installed, running the command will build it and place it in the build folder

```
dub build main:editor
```

Inputs are Inputs are ```i``` to go into insert mode (a la vim) and ```:``` to open the command palette with typing to search, ```up``` and ```down``` to navigate and ```enter``` to select an option and clicking on a panel to focus it.

It's currently in an early state, it has core functionality built out but is still a work in progress and isn't currently recommended for use.

## Details

- Editor that supports multiple text buffers through multiple panels that can be automatically resized and arbitrarily split
- Command palette for actions such as opening/saving files, splitting text editor views and eventually will contain config options and key bindings.
- Implemented with minimal external dependencies, only using cglm/xxhash/Vulkan Memory Allocator as well as system libraries and Vulkan for the graphics API
- Manual memory management primarily using arenas, no GC usage.
- Syntax highlighting (for D and C-like languages) and auto indenting/auto closing pairs (strings, braces, etc)
- Animations such as smooth scrolling, highlighting on focus and animated cursors with text after the cursor having its position animated

### Demonstration Video

https://git.sleepy.day/sleepy-day/editor/raw/branch/master/media/editor-demo.mp4

### Gifs

![CommandPalette](https://git.sleepy.day/sleepy-day/editor/raw/branch/master/media/command-palette.gif)

![Panels](https://git.sleepy.day/sleepy-day/editor/raw/branch/master/media/panels.gif)

![AnimatedCursor](https://git.sleepy.day/sleepy-day/editor/raw/branch/master/media/animated-cursor.gif)

![TextInput](https://git.sleepy.day/sleepy-day/editor/raw/branch/master/media/text-input.gif)

