OSX 上的 Alt+空格导致 HTML 中的代码有缺陷(Coda)

发布于 2024-07-25 12:18:45 字数 155 浏览 4 评论 0原文

代码中使用不规则空格会导致 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉宸 2024-08-01 12:18:45

您可以创建自己的自定义键映射,只需在 ~/Library/KeyBindings 下创建一个名为 DefaultKeyBinding.dict 的文件即可。 出于您的目的,该文件需要包含以下行:

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */

/* My custom Keybinds */
{
    "~ " = ("insertText:", " ");    /* Option + Space = Space */
}

不幸的是,此解决方案不适用于所有程序,因为绑定取决于 Cocoa 框架,甚至某些使用它的应用程序确实忽略了某些组合(有关缺陷的更多信息可以可以在此处的“警告”下找到。

其他链接:


关于你的HTML问题

它实际上应该在 HTML 或 CSS 中使用非 ASCII 字符不会造成任何问题,但使用错误的字符集可能会导致不必要的显示效果。 在不了解具体情况的情况下,我无法对此做出任何具体的诊断。

You can create your own custom key map, simply by creating a file under ~/Library/KeyBindings, named DefaultKeyBinding.dict. For your purpose the file needs to contain the following lines:

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */

/* My custom Keybinds */
{
    "~ " = ("insertText:", " ");    /* Option + Space = Space */
}

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文