Chris
Chris

Reputation: 1038

Vim inserts invisible strange characters which result in a syntax error

Occasionally when using vim, invisible characters are inserted which result in a syntax error. When I delete the line and rewrite it it works.

In my case RubyMine also states that an error exists in this line. In basically makes vim a pain because it inserts invisible bugs in my code.

I'm using Mac with zsh as my shell. Furthermore I'm using vim installed using homebrew

Upvotes: 2

Views: 312

Answers (1)

Chris
Chris

Reputation: 1038

If this problem occurs with anyone else, it was the ALT/OPTION + SPACE key on MacOS that created this problem and not related to vim or zsh at all.

A solution can be found here: https://superuser.com/questions/78245/how-to-disable-the-option-space-key-combination-for-non-breaking-spaces

Upvotes: 1

Related Questions