exercism / website

The codebase for Exercism's website.
https://exercism.org
GNU Affero General Public License v3.0
440 stars 126 forks source link

Support LaTeX tab-completions in online editor #1019

Open SaschaMann opened 3 years ago

SaschaMann commented 3 years ago

In many languages it is common to use unicode characters in code, for example for operators or variable names. Writing these on popular keyboard layouts like qwertz or azerty is not easily possible. Therefore most environments and editors that support these languages, and most editors in general, have support to tab-complete them based on LaTeX codes. The online editor should support these as well.

For some examples, typing

A full list of completions of all completions available in Julia can be found here:

Those files also contain scripts on top to generate most of the mappings easily. They could likely be used to create a mapping that fits whatever format the Exercism editor uses, to reduce manual work.

There are probably similar lists for other languages but since these are based on the LaTeX codes, they should not conflict with eachother, even if they contain different sets of characters.

Without this feature, some Julia concept exercise will not be solvable in the online editor alone and will require people to copy-paste from the REPL or another editor. This is not avoidable because these kinds of completions are a standard feature across every Julia environment, incl. the default REPL, and necessary to write idiomatic code in many cases.

iHiD commented 3 years ago

(Seems like there's stuff here: https://github.com/mu-io/codemirror-tex. Will need investigating :+1:)