更改 Sublime Text 中的自动完成功能以使用单引号而不是双引号 (HTML)

发布于 2025-01-20 18:28:09 字数 350 浏览 3 评论 0 原文

默认情况下,sublime Text AutoComplete使用双引号,例如,如果我开始键入

<img

并点击选项卡,则建议:

<img src="">

可以更改自动完成行为,以便它建议:

<img src=''>

类似地,对于其他元素,例如:

<a href=''></a>

IE我正在寻找对于全局解决方案,不要一次更改一个自动完成的行为。

感谢您的帮助。

By default sublime text autocomplete uses double quotes, for example if I start typing

<img

and hit tab, it will suggest:

<img src="">

Is it possible to change the autocomplete behaviour so that it suggests:

<img src=''>

and similarly for other elements, for example:

<a href=''></a>

i.e. I'm looking for a global solution, not to change the behaviour one autocomplete at a time.

Thanks for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

老街孤人 2025-01-27 18:28:09

这是全球不可能的。不同 packages 使用不同的方法来生成完成 .sublime-completion 文件和基于Python的插件。其中一些确实使用单语引号,例如python 如果__name __ =='__ main __' sminippet ,但是其他,例如 html_completions.py ,使用双引号。

如果您主要使用一种或几种语言,则可以使用 packageresourceviewer ,但是没有办法在全球上进行。

This is not possible globally. Different packages use different methods for generating completions: .sublime-completion files, snippets, and Python-based plugins. Some of them do use single quotes, for example the Python if __name__ == '__main__' snippet, but others, like html_completions.py, use double quotes.

If you use one or a few languages primarily, it might be possible to edit the completions files to your liking using a tool like PackageResourceViewer, but there isn't a way to do it globally.

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