Convert Betacode Greek entry, which allows using ordinary ASCII characters to write in ancient Greek, to Unicode in Neovim. This is a reworking of the script at http://www.ub-filosofie.ro/~solcan/wt/gnu/a/agvim.html, which I used for years. Thanks to the original author!
:BetacodeToUnicode- Convert the entire buffer from Betacode to Unicode.:BetacodeToUnicodeVisual- Convert only the visually selected text.- Supports accents (
/), breathing marks (),(), macrons (&), breves ('), and automatic final sigma conversion.
Add to your lazy.lua:
{ "utrumsit/betacode-to-unicode" }use "utrumsit/betacode-to-unicode"Plug 'utrumsit/betacode-to-unicode'- Command:
:BetacodeToUnicode - Effect: Transforms all Betacode text in the current buffer to Unicode Greek, leaving non-Betacode text unchanged.
- Example: Type
pro/s kai/in a buffer, run:BetacodeToUnicode, and getπρός καί.
- Command:
:BetacodeToUnicodeVisual - Steps:
- Enter visual mode (
vfor character-wise,Vfor line-wise). - Select the Betacode text you want to convert.
- Run
:BetacodeToUnicodeVisual.
- Enter visual mode (
- Effect: Only the selected text is converted, preserving surrounding content.
- Example: In
English pro/s here, selectpro/s, run the command, and getEnglish πρός here.
Here are some common Betacode inputs and their Unicode outputs:
| Betacode | Unicode Output | Description |
|---|---|---|
pro/s |
πρός |
"Toward" with acute accent |
kai/ |
καί |
"And" with acute accent |
h) |
ἠ |
Eta with smooth breathing |
h( |
ἡ |
Eta with rough breathing |
a& |
ᾱ |
Alpha with macron (long) |
i' |
ῐ |
Iota with breve (short) |
lo/gos |
λόγος |
"Word" with medial/final sigma |
This plugin is licensed under the GNU General Public License v3.0 (GPL-3.0), following the original script’s licensing by Mihail Radu Solcan. See the LICENSE file for details.