Clone
7
Home
arthur edited this page 2026-01-25 16:00:34 +01:00

Beluga Wiki

Presentation

Beluga is an open source text editor with lisp configuration files. Several builtins functions are available, but you can create yours with lisp syntax.

Installation

From source

Requirements

The project is build with meson so you will need it on your computer to compile the project. You will also need a C compiler.

Process

First clone the repo and move into it. Then build the project by this installation script.

./install.sh

The binary will be build/beluga.

From release

You have on the release page the binary of the editor already compile and ready to use on your computer. Just download it as artifact.

Functions

Here is a list of none exhaustive builtins functions.

Add-prefix

Syntax

(add-prefix "prefix-name")

Description

The add-prefix function create a new prefix that can be used for map-keys. The default prefix is "no-prefix" and should be used for normal uses in map-keys.

editor-set-prefix

Syntax

(editor-set-prefix "prefix-name")

Description

The add-prefix function changes the current prefix state to the new one.

Map-key

Syntax

(map-key "key-binds" command "prefix")

Description

The map-key function allows you to link lisp function (or builtins CLispFunction) to key sequences with a certain prefix.

Define

Syntax

(define macro value)

or

(define function-name (lisp-code)

Description

The define function defines macros and functions that you will reuse in your code.

Add-package

Syntax

(add-package "package-name")

Description

The add-package function import packages from the packages folder (~/.beluga/packages/)

Key-binds

Key-binds are defines with macro on key names.

key-name macro
arrow right ARROW-RIGHT
arrow left ARROW-LEFT
arrow up ARROW-UP
arrow down ARROW-DOWN
enter ENTER
backspace BACKSPACE
delete DEL
page up PAGE-UP
page down PAGE-DOWN
control CTRL-letter

Packages

You can add packages to the editor by cloning packages repo in the packages folder under .beluga.