OSX 上的 Alt+空格导致 HTML 中的代码有缺陷(Coda)
代码中使用不规则空格会导致 CSS 或 HTML 有缺陷,这是一个已知问题吗?
当打字速度有点快时,我有时会键入 ALT+SPACE 而不是 SPACE(大多数时候在大括号之前)。
是否有可能使所有替代空间符号(眼睛看不见,但代码不可见)成为标准空间符号?
Is it a known problem that unregular spaces used in code can cause a CSS or an HTML to be defective ?
When typing a bit fast, I sometimes type ALT+SPACE instead of SPACE (before the curly braces most of the time).
Is it possible to make all alternative spaces symbols (that are invisible to the eyes, but not to the code) be the standard space symbol ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建自己的自定义键映射,只需在
~/Library/KeyBindings
下创建一个名为DefaultKeyBinding.dict
的文件即可。 出于您的目的,该文件需要包含以下行:不幸的是,此解决方案不适用于所有程序,因为绑定取决于 Cocoa 框架,甚至某些使用它的应用程序确实忽略了某些组合(有关缺陷的更多信息可以可以在此处的“警告”下找到。
其他链接:
关于你的HTML问题
它实际上应该在 HTML 或 CSS 中使用非 ASCII 字符不会造成任何问题,但使用错误的字符集可能会导致不必要的显示效果。 在不了解具体情况的情况下,我无法对此做出任何具体的诊断。
You can create your own custom key map, simply by creating a file under
~/Library/KeyBindings
, namedDefaultKeyBinding.dict
. For your purpose the file needs to contain the following lines:Unfortunately this solution doesn't work for all programs since the bindings are depending on the Cocoa framework and even some of the applications using it do ignore some combinations (more information about the deficits can be found here, under "Caveat").
Additional Links:
About your HTML problem
It actually shouldn't cause any problems to use non-ASCII characters in HTML or CSS but using the wrong character set can lead to unwanted display effects. Without knowing the specific context I can't give any concrete diagnosis about that.