Sublime Forum

"var" tab completion Conflict with Djaneiro

#1

Working with Django templating tab completions become very nice when typing “{{ }}” and “{% %}” so I installed Djaneiro. It has tab completions for those (var, and tag respectively) and many others.

What is really frustrating is that there seems to be another tab completion that overrides and always writes “”

I am using Sublime Text 2 Version 2.0.2 Build 2221

I have already removed both capital and lowercase “var” completions in the default Sublime HTML package. I wrote this article on what I did.

I have set the correct syntax highlight for Djaneiro to work:
View->Syntax->Djaneiro->HTML (Django)

  • When typing “var” and pressing Ctrl+space it writes “{{ }}”

  • When typing “var” and pressing tab it writes""

I want to remove the stupid “” so that when pressing tab the Djaneiro completion works.

0 Likes

#2

I have also looked at the XML default package but I do not see any “var” tab completions. I am no closer to solving this issue :cry:

0 Likes

#3

It has been imposible to me removing the “” tag, even doing what is described here: gist.github.com/MadLittleMods/6831544, but I have found this solution:

  1. In Ubuntu, go to ~/.config/sublime-text-2/Packages/Djaneiro/html (or wherever it is in Windows or Mac).
  2. Create a new file named “vari.sublime-snippet” (unfortunately it doesn’t work with “var.sublime-snippet”; you can replace “vari” with any other expression you like; it’s what you will have to type instead of “var”).
  3. The content of this file should be as follow (replacing “vari” with your selected expression):
vari text.html.django add variable

I hope it could be useful to you.

0 Likes

#4

What I did is overwrite the Emmet Settings under Preferences -> Package Settings -> Emmet -> settings -User

Copy the “known_html_tags” from settings - Default, delete the “var” and save…

0 Likes