Home Download Buy Blog Forum Support

SetDjangoSyntax

SetDjangoSyntax

Postby pjv on Tue Jan 17, 2012 7:42 pm

i made a quick and dirty little plugin that attempts to set the syntax of the open buffer to "python django" when appropriate.

it is dependent on having already installed the Djaneiro package.

the way that SetDjangoSyntax works is probably pretty dumb, but in practice it seems to work fairly well on my box. please fork the repo and improve it if you can. at present, all it does is search the text of an open buffer whose filename ends in '.py' for a string that equals "from django". if it finds that string it sets the syntax to "python django".

install SetDjangoSyntax via package control.

or you can download it directly (and/or view source) here.
pjv
 
Posts: 30
Joined: Fri Feb 04, 2011 6:34 pm

Re: SetDjangoSyntax

Postby pjv on Wed Mar 14, 2012 4:39 pm

lately i noticed that every python file was being set to Python Django syntax. I *think* but am not sure that this is due to a change in Djaneiro.

in any case, i went about trying to fix it and found a bug in SetDjangoSyntax that i just pushed a fix for. the latest version in the repo (and i assume soon to push out to everyone via package control) tries to be smart about whether to change a file's syntax to Python Django or just Python syntax.

please let me know if anyone is seeing issues with this version.
pjv
 
Posts: 30
Joined: Fri Feb 04, 2011 6:34 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 11 guests