I have an annoying issue on macOS when using Elixir and vim or IEx on macOS. When I write a pipe (
|>), I often accidentally hold the option key before hitting space and pipe. But it seems that this combination,
option + space writes an alternative kind of space.
In this example, the first command succeeds, but the second fails because it has the “alternative space” in it:
iex(1)> [1,2,3,4] |> Enum.map(& &1 * 2) [2, 4, 6, 8] iex(2)> [1,2,3,4] |> Enum.map(& &1 * 2) ** (SyntaxError) iex:2:13: unexpected token: " " (column 13, code point U+00A0)
I’m using Terminal.app on macOS 11.
Does anyone know a workaround for this. Perhaps a way to disable option+space or remap it to regular space?