Avoiding Non-breaking spaces
In Mac OS X, if you press Option + Space you will get the following character: " ". It can cause trouble in browsers when present in Javascript files. It's ascii code is 160 and is called Non-breaking space.
With JSHint: You can enable the rule nonbsp
to get errors when that character is present. (Also, if using NPM you may want to enable pre-commit hook validation)
With vim: You can change listchars to show ¬
where the non-breaking spaces are present. Check this vim tip to highlight them. In addition, if you are using solarized theme, you will need to do some extra work to get it working.
Written by Alberto Pose
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Nodejs
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#