Home Download Buy Blog Forum Support

"var" tab completion Conflict with Djaneiro

"var" tab completion Conflict with Djaneiro

Postby MLM on Fri Oct 04, 2013 8:33 pm

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 "<var></var>"

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"<var></var>"

I want to remove the stupid "<var></var>" so that when pressing tab the Djaneiro completion works.
Last edited by MLM on Thu Oct 10, 2013 3:31 pm, edited 1 time in total.
MLM
 
Posts: 2
Joined: Fri Oct 04, 2013 8:19 pm

Re: "var" tab completion Conflict with Djaneiro

Postby MLM on Wed Oct 09, 2013 7:28 pm

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:
MLM
 
Posts: 2
Joined: Fri Oct 04, 2013 8:19 pm

Re: "var" tab completion Conflict with Djaneiro

Postby davydorum on Tue Jan 21, 2014 3:53 pm

It has been imposible to me removing the "<var></var>" tag, even doing what is described here: https://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):

<snippet>
<content><![CDATA[{{ $1 }}]]></content>
<tabTrigger>vari</tabTrigger>
<scope>text.html.django</scope>
<description>add variable</description>
</snippet>

I hope it could be useful to you.
davydorum
 
Posts: 1
Joined: Tue Jan 21, 2014 3:42 pm


Return to Technical Support

Who is online

Users browsing this forum: Alexa [Bot], Google [Bot] and 20 guests