How to make Sublime Text 3 default templates

大兔子大兔子 提交于 2019-12-21 21:55:06

问题


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>

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?


回答1:


You can change the default snippet with the PackageResourceViewer plugin.

  • 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


来源:https://stackoverflow.com/questions/35004161/how-to-make-sublime-text-3-default-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!