Home Download Buy Blog Forum Support

[solved] xml auto formatting problem

[solved] xml auto formatting problem

Postby pier on Sun Aug 05, 2012 5:12 pm

In the default XML bundle, whenever you write something and press tab, it creates a node with that word.

My problem is that it interferes with every snippet I create, and can't jump to the next tab position ($1, $2, $3, etc) without creating a new unwanted xml node.

I've looked into the snippets of the default bundle but haven't found a way to change this behavior...

I'm really annoyed by the fact that not only it creates a new node, it also puts 3 line breaks.

How can I change that?

TIA
Last edited by pier on Tue Nov 06, 2012 8:30 pm, edited 1 time in total.
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: xml auto formatting problem

Postby pier on Wed Aug 08, 2012 2:42 pm

bump
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: xml auto formatting problem

Postby pier on Fri Aug 17, 2012 1:31 pm

BUMP

Can anyone tell me how to change the xml bundle so that it does NOT make a new node with 3 lines everytime I press TAB ?

myNode + TAB produces:

Code: Select all
<myNode>

</myNode>


How can I change that?
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: xml auto formatting problem

Postby pier on Tue Nov 06, 2012 7:52 pm

bump

This is stil giving me problems...

How can I completely override the default XMl package snippets?
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: xml auto formatting problem

Postby agibsonsw on Tue Nov 06, 2012 8:13 pm

This behaviour might be from a plug-in such as ZenCoding. If it is from an XML snippet then try removing these snippets from your Packages folder.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: xml auto formatting problem

Postby pier on Tue Nov 06, 2012 8:23 pm

agibsonsw wrote:This behaviour might be from a plug-in such as ZenCoding. If it is from an XML snippet then try removing these snippets from your Packages folder.


You are absolutely and totally right.

I disabled Zen Coding and now everything works as expected. I would have never guessed the problem was not in the XML package... sorry for being such a sublime text ignorant.

I've searched if there was some config file in the Zen Coding folder, but couldn't find anything. Again, I may have missed something very obvious.

Is there a way to disable Zen Coding for XML files?
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: xml auto formatting problem

Postby pier on Tue Nov 06, 2012 8:29 pm

SOLVED!!!

So I edited the file Default.sublime-keymap in Zen Coding folder, and removed text.xml and text.xsl from this portion.

Code: Select all
{
   "keys": ["tab"], "command": "expand_zen_abbreviation_on_tab", "context":
   [
      { "key": "selector", "operator": "equal", "operand": "source.css - source.css.embedded, text.html -source -meta.tag, meta.scope.between-tag-pair.html -source", "match_all": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "is_zen", "match_all": true },
      { "key": "setting.zen_keybinds", "operator": "equal", "operand": true }
   ]
}


Thank you AGibson!!
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 19 guests