epher : Calculator language with inline answers and unit conversion
| script karma |
Rating 0/0,
Downloaded by 160 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Upy Esp |
| |
| script type |
| utility |
| |
| description |
epher is a calculator language: you write ordinary math, with units that convert, and every statement's answer appears inline, right next to the line that produced it.
This package teaches Vim the language. It adds filetype detection for .epher files, syntax highlighting for comments, strings, every number form (decimal, scientific, 0b, 0o, 0x, imaginary i), the twenty keywords, and the conservative unit-suffix rule that mirrors the parser's adjacency rule. The ftplugin settings cover # comments (commentstring) and _ in iskeyword, so x1 and sin_x stay whole. The same files work in Neovim.
What Vim gets on its own: the highlighting and filetype settings above, in any .epher file, with nothing to configure. The inline answers, diagnostics, hover, completion, and script runs come from the shared epher-lsp language server and need a client for it. Vim reaches that server through the vim-lsp plugin (with its async.vim dependency); with both installed and epher-lsp on your PATH, register it once in your vimrc:
if executable('epher-lsp') au User lsp_setup call lsp#register_server({ \ 'name': 'epher', \ 'cmd': {server_info -> ['epher-lsp']}, \ 'allowlist': ['epher'], \ }) endif
That wiring adds the language server features to Vim: diagnostics, hover, completion, and the :EpherRun results pane. The inline answers are inlay hints; vim-lsp renders them when g:lsp_inlay_hints_enabled is set and Vim runs as Vim9 with virtual text. Neovim has its native glue in the repository's clients/nvim directory; its README has the setup lines.
Required prerequisite: the epher-lsp language server. Without it, .epher files get highlighting only. The inline answers, diagnostics, hover, completion, and script runs all come from the server. Download the build for your operating system from the releases page at https://github.com/upyesp/epher/releases and put it on your PATH. Per-platform install instructions are on the epher website, in the Any LSP client section of the IDE Extensions page: https://epher.org/ide.html#any-lsp where the PATH setup for every operating system is shown.
Usage: open any .epher file. Vim detects the filetype and applies the syntax automatically, and :EpherRun runs the script once the language server is attached.
What it looks like: the repository has terminal captures of the inline answers, hover, completion, and the run results at https://github.com/upyesp/epher/tree/main/clients/vim/images on GitHub.
epher.org has the standalone calculator and a library of ready-made scripts: https://epher.org |
| |
| install details |
Install: - copy the ftdetect, syntax, and ftplugin directories into ~/.vim/ (~/vimfiles on Windows, $VIM/vimfiles for a system-wide install); - or download epher-vim.zip from https://github.com/upyesp/epher/releases and extract it into ~/.vim/pack/epher/start/, where Vim picks up the epher-vim directory automatically; - or with a plugin manager, point it at the directory, or add "set runtimepath+=/path/to/epher-vim" to your vimrc. |
| |
script versions (upload new version)
Click on the package to download.
| epher-vim.zip |
v0.5.86 |
2026-10-13 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher v0.5.86 train. |
| epher-vim.zip |
v0.5.85 |
2026-10-12 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher v0.5.85 train. |
| epher-vim.zip |
v0.5.84 |
2026-10-12 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher v0.5.84 train. |
| epher-vim.zip |
v0.5.83 |
2026-10-12 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher v0.5.83 train. |
| epher-vim.zip |
v0.5.82 |
2026-10-11 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher v0.5.82 train. |
| epher-vim.zip |
v0.5.81 |
2026-10-11 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher v0.5.81 train. |
| epher-vim.zip |
0.5.80 |
2026-10-11 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.80 train. |
| epher-vim.zip |
0.5.79 |
2026-10-10 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.79 train. |
| epher-vim.zip |
0.5.78 |
2026-10-10 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.78 train. |
| epher-vim.zip |
0.5.77 |
2026-10-10 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.77 train. |
| epher-vim.zip |
0.5.76 |
2026-10-10 |
9.0 |
Upy Esp |
- docs(vim): listing text polish and vim.org greedy-link fixes - feat(vim): drive the vim.org edit-details form for listing text updates - feat: make the lsp server a visible prerequisite across the manual clients - chore(vim): dump the logged-in versions table in dry-run mode - docs(vim): record the cancel-button lesson and the 0.5.59 catch-up - fix(vim): send only the primary submit button to vim.org - chore(vim): dump the raw upload form in dry-run mode - chore(vim): log the vim.org response page and retry verification - feat(vim): publish the lean zip to vim.org from ci |
| epher-vim.zip |
0.5.75 |
2026-10-10 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.75 train. |
| epher-vim.zip |
0.5.74 |
2026-10-10 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.74 train. |
| epher-vim.zip |
0.5.73 |
2026-10-10 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.73 train. |
| epher-vim.zip |
0.5.72 |
2026-10-09 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.72 train. |
| epher-vim.zip |
0.5.71 |
2026-10-08 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.71 train. |
| epher-vim.zip |
0.5.70 |
2026-10-08 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.70 train. |
| epher-vim.zip |
0.5.69 |
2026-10-08 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.69 train. |
| epher-vim.zip |
0.5.68 |
2026-10-08 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.68 train. |
| epher-vim.zip |
0.5.67 |
2026-10-08 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.67 train. |
| epher-vim.zip |
0.5.66 |
2026-10-08 |
9.0 |
Upy Esp |
Maintenance release, tracking the epher 0.5.66 train. |
| epher-vim.zip |
0.5.65 |
2026-10-06 |
9.0 |
Upy Esp |
- docs(vim): listing text polish and vim.org greedy-link fixes (#94) - feat(vim): drive the vim.org edit-details form for listing text updates (#93) |
| epher-vim.zip |
0.5.64 |
2026-10-06 |
9.0 |
Upy Esp |
- feat: make the lsp server a visible prerequisite across the manual clients (#92) - chore(vim): dump the logged-in versions table in dry-run mode (#91) - fix(vim): send only the primary submit button to vim.org (#90) - chore(vim): dump the raw upload form in dry-run mode (#89) - chore(vim): log the vim.org response page and retry verification (#88) - feat(vim): publish the lean zip to vim.org from ci (#85) |
| epher-vim.zip |
0.5.59 |
2026-10-05 |
9.0 |
Upy Esp |
- docs(vim): the script is published on vim.org as 6195 - feat: the vim captures and the readme gallery - feat: the six-channel listing copy |
| epher-vim.zip |
0.5.57 |
2026-09-30 |
9.0 |
Upy Esp |
Initial upload |
ip used for rating: 18.97.14.85
|