Hacker News new | past | comments | ask | show | jobs | submit login

I suppose there are many examples like this. Once I've copied a piece of code from SO but IntellijIDEA was warning me that the semicolon at the end of the line is not correct.

Upon further investigation(I think IntelljIDEA reported Unicode value) I've found out that the 'semicolon' I copied is a Greek character that looks exactly like semicolon.

I wonder how people on vim/emacs deal with situation like this.




It's similar when online editors try to be clever and replace a straight " with a fancy one (like in Word), really annoying.


That's why Powershell actually recognizes those fancy quotes and treats those as normal quotes.


So one Microsoft product contains an automatic workaround for an issue created by another Microsoft product.


On VSCode, I use the Gremlins extension which highlight all those suspicious characters.

https://github.com/nhoizey/vscode-gremlins


Pressing ga in command mode in Vim displays the ASCII / Unicode value of the character under the cursor.


Yes, but IntelljIDEA's Linter showed me the error. Without linter you'll need compiler/interpreter to tell you something is not right.

And in my case, even if compiler / interpreter reported about an invalid syntax - I would not think of checking the unicode codepoint as it the character appeared to look exactly like semicolon.


The rust compiler warns when it encounters confusable symbols like that. Not sure about other languages.


vim user here. Most of us are running the same linters and language servers as every other major editor, which does a pretty good job catching stuff like this. Modern vim is really only a C core with a web of JS, Python, Lua, and vimscript using the exact same third party solutions for every other part of an "IDE". emacs is probably similar, but no personal experience with that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: