0

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

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

3 Comments

There's not this line in my file. I found normal_tags = ([ with 'input' in the middle.
which build of ST3 are you using? you can find out from the Help menu -> About
Stable Channel, Build 3103

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.