# Tab completion of more than one Unicode character at a time

**URL:** <https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505>\
**Category:** General Usage\
**Tags:** repl, vscode, unicode\
**Created:** [December 22, 2021, 5:59pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505 "2021-12-22T17:59:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [December 22, 2021, 5:59pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/1 "2021-12-22T17:59:40Z")

</div>

Is there a way to type this variable

```julia
xᵢ₊₁

```

without having to manually tab complete each separate character: x\_i TAB \_+ TAB \_1 TAB?

In Latex this would be x\_{i+1}. Is there an equivalent in Julia?

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 22, 2021, 6:12pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/2 "2021-12-22T18:12:13Z")

</div>

Type in the REPL: `x\_i+1<tab>`

NB: in help mode `?` paste the symbol and Julia will tell you how to type it.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [December 22, 2021, 6:35pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/3 "2021-12-22T18:35:15Z")

</div>

Has this always worked? How “long” can be the expression?

I remember some discussion on how nice would it be to support more general latex syntaxes for combining Unicode chars, I didn’t remember this working. Cool.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 22, 2021, 6:48pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/4 "2021-12-22T18:48:56Z")

</div>

It seems to take a [googol](https://www.youtube.com/watch?v=0lFQOmb6mVs):

```julia
xᵢ₊₁₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀ = π

julia> xᵢ₊₁₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀₀
π = 3.1415926535897...

```

```julia
I❤ⱼᵤₗᵢₐ

```

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 22, 2021, 10:47pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/5 "2021-12-22T22:47:52Z")

</div>

> [@lmiq](#):
>
> Has this always worked? How “long” can be the expression?

It was a new feature in Julia 1.6; it works `\_` or `\^` followed by any sequence of subscripts or superscript characters, respectively, as long as all of the characters have Unicode sub/superscripts.

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [December 23, 2021, 1:47am UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/6 "2021-12-23T01:47:02Z")

</div>

Unfortunately it doesn’t seem to work in VSCode, just in the REPL.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 23, 2021, 8:49am UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/7 "2021-12-23T08:49:41Z")

</div>

You may want to install the [Fast Unicode Math Characters plugin](https://marketplace.visualstudio.com/items?itemName=GuidoTapia2.unicode-math-vscode) in VSCode.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [December 23, 2021, 12:42pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/8 "2021-12-23T12:42:36Z")

</div>

> [@stevengj](#):
>
> It was a new feature in Julia 1.6; it works `\_` or `\^` followed by any sequence of subscripts or superscript characters, respectively, as long as all of the characters have Unicode sub/superscripts.

While convenient for some usecases, that’s unfortunate for others. Quoting myself from slack:

> [@](#):
>
> Noticed a weird behavior of unicode completion in the REPL:  
> `\^gam` `<tab>` results in `ᵍᵃᵐ`  
> `\^gamma` `<tab>` results in `ᵞ`  
> That is, one cannot really get completion for `\^gamma` when typing a part of the word. Regular non-uppercase symbols complete fine: `\gam` `<tab>` completes to `\gamma` .  
> Is that intended?

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 23, 2021, 12:45pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/9 "2021-12-23T12:45:18Z")

</div>

> [@aplavin](#):
>
> `\^gamma` `<tab>` results in `ᵞ`

We could probably allow `\^\gamma` for `ᵞ`, in which case completion of `\^\gam` could work.

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [December 25, 2021, 3:53pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/10 "2021-12-25T15:53:23Z")

</div>

Do you know if the Fast Unicode Math plugin does tab completion in the same way as Julia does in the REPL? For example, for the gamma issue raised by @aplavin would Fast Unicode Math and REPL tab completion give the same result?

If they don’t it could lead to confusing inconsistencies between REPL completion vs. completion in VSCode editor windows.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 25, 2021, 4:03pm UTC](https://discourse.julialang.org/t/tab-completion-of-more-than-one-unicode-character-at-a-time/73505/11 "2021-12-25T16:03:18Z")

</div>

As requested, the F.U.M. VSCode plugin produces the following completions in the editor pane:

```julia
\^gam <tab> results in ᵞ
\^gamma <tab> results in ᵞ
\gam <tab> results in γ

```
