如何制作 Sublime Text 3 默认模板 [英] How to make Sublime Text 3 default templates

查看:31
本文介绍了如何制作 Sublime Text 3 默认模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Sublime Text 3 中,当我创建一个新文件(HTML、JavaScript、PHP 等)时,有没有办法编辑默认标签及其缩进?目前,当我创建一个新文件时,比如 HTML,我得到:

In Sublime Text 3, when I create a new file (HTML, JavaScript, PHP, etc), is there a way to edit the default tags and their indentations? Currently, when I create a new file, say HTML, I get:

<html>
<head>
  <title></title>
</head>
<body>
</body>
</html>

我想更改它以便创建一个新的 HTML 文件:

I would like to change it so that a new HTML file creates:

<html>
  <head>
    <title></title>
  </head>

  <body>
  </body>
</html>

这在没有插件的情况下是否可行,还是我必须搜索/制作一个?

Is this possible without plugins or will I have to search for/make one?

推荐答案

您可以使用 PackageResourceViewer<更改默认代码段/a> 插件.

You can change the default snippet with the PackageResourceViewer plugin.

  • 通过Package Control
  • 安装PackageResourceViewer
  • Ctrl+Shift+P并输入prv
  • 选择PackageResourceViewer:打开资源
  • 输入 html 并选择它.
  • 选择html.sublime-snippet
  • Install PackageResourceViewer through Package Control
  • Press Ctrl+Shift+P and type prv
  • Select PackageResourceViewer: Open Resource
  • Type html and select it.
  • Select html.sublime-snippet

这篇关于如何制作 Sublime Text 3 默认模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆