alek-sys / sublimetext_indentxml

Plugin for Sublime Text editor for reindenting XML and JSON files
MIT License
534 stars 136 forks source link

After installing, cannot use, "Indent XML" is greyed out #111

Open balihoo-cnorwood opened 6 years ago

balihoo-cnorwood commented 6 years ago

Installed per instructions but can't get it to work.
Tried on Sublime Text 3.1 and 3.1.1 on OSX

Specifically followed these from README.md

"chord" command Ctrl+K, Ctrl+F (this mean hold Ctrl, press K then press F, release Ctrl) and also available in "Selection" menu.

Crtl+K deletes my selection, so chord command doesn't work

Selection / Format menu shows several items, but cannot click on "Indent XML" because it is disabled (greyed out)

wmbr commented 6 years ago

Same here. It used to work, so I think this was caused by the 3.1 update.

VelizarHristov commented 6 years ago

Same - I'm a first time user.

It would be useful it hovering over a disabled button would give useful information about why it is disabled.

alek-sys commented 6 years ago

That is a tricky one. I don't think Sublime allows to show any extra information on hover on disable menu item. Probably the best thing to do is to show a little message in the status bar when plugin decides if command is enabled or not. I'll see what can be done.

Also plugin works fine in 3.1.1 so probably this is something specific to your setup?

wmbr commented 6 years ago

Make sure you have the document's syntax set to XML (View -> Syntax).

mrmeszaros commented 4 years ago

I had a similar issue - an other plugin (A File Icon) added an XML (SVG) syntax, which turned it disabled.

Either an Enable/Disable Indent XML for current syntax could be added, and/or a setting, where the user can configure the languages for which indentation should be enabled.