Enrique René
Enrique René

Reputation: 598

Sublime snippet

When I'm coding in HTML and use input tag, sublime autocompletion gives me <input></input>. I'd love sublime gives me <input />.

How can I change this? (my sublime is version 3)

I saw this: How to change default code snippets in Sublime Text 3?

and this video (portuguese audio): https://www.youtube.com/watch?v=9iTu3C9FzX4

Upvotes: 0

Views: 93

Answers (1)

Keith Hall
Keith Hall

Reputation: 16065

Sublime's HTML autocompletions are done in a Python script.

  1. Install PackageResourceViewer using Package Control (if it isn't already installed)
  2. From the Command Palette, select PackageResourceViewer - Open Resource
  3. Select HTML
  4. Select html_completions.py
  5. Find the line ('input\tTag', 'input type=\"$1\" name=\"$2\">'),
  6. Change it to ('input\tTag', 'input type=\"$1\" name=\"$2\" />'),
  7. Save the file

Upvotes: 2

Related Questions