Home > Development Tools > sublime > body text

How to jump to the browser in sublime

下次还敢
Release: 2024-04-03 14:54:22
Original
802 people have browsed it

如何在 Sublime Text 中快速跳转到浏览器

在 Sublime Text 中,可以轻松地在编辑器中打开文件并直接跳转到浏览器中查看。此功能对于快速验证代码更改或访问所需文件非常有用。

步骤:

  1. 配置浏览器打开命令:

    • 导航至 “Preferences” > “Settings - User”。
    • 在 JSON 文件中添加以下代码:
    <code>"open_browser_command": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe %s"</code>
    Copy after login
    • 替换 C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe 为你计算机上 Chrome 安装的路径。
  2. 打开文件:

    • 在 Sublime Text 中,打开你要浏览的文件。
  3. 跳转到浏览器:

    • 如果你使用 Windows,请按 Ctrl + B
    • 如果你使用 macOS,请按 Cmd + B
  4. 查看已打开的文件:

    • Sublime Text 将在默认浏览器中打开该文件。

高级设置:

  • 自定义浏览器命令:你可以将任何浏览器命令分配给 “open_browser_command” 设置。
  • 使用特定浏览器标签:通过在命令中添加参数,例如 --new-tab--incognito,可以在特定标签或隐身模式中打开文件。
  • 使用外部插件:有许多第三方插件可以扩展 Sublime Text 中的浏览器跳转功能,例如 “BrowserPlus” 和 “Open in Browser”。

The above is the detailed content of How to jump to the browser in sublime. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!