Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working on OSX via Package control installation #1

Closed
francoiskha opened this issue Nov 15, 2011 · 11 comments
Closed

not working on OSX via Package control installation #1

francoiskha opened this issue Nov 15, 2011 · 11 comments
Assignees

Comments

@francoiskha
Copy link
Contributor

I could not make it work on OSX. I installed indent XML via Package control but there is no command available.

@ghost ghost assigned alek-sys Nov 16, 2011
@alek-sys
Copy link
Owner

Hi,
thanks for your comment.
In package folder there is file Default (Windows).sublime-keymap - with keymaps for Windows.
Because I have no Mac I'm not sure I can create correct shortcut for it (I'm not even sure that it has Ctrl key :) ).
So if you are able to create appropriate keymap file for OSX and commit it to github - it would be great. Anyway I'll try to find Mac and add keymap by myself, but it can take a time.

Regards, Alexey.

@francoiskha
Copy link
Contributor Author

Hi and thanks for answering so fast

I am not very familiar with Sublime Text 2 (just discovered it). But I will contribute a .sublime-keymap file for OSX. Macs does have a ctrl key though and creating a .sublime-keymap with

{ "keys": ["super+k", "super+f"], "command": "indentxml" }

doesn't work either.
There is probably another problem, I can't run the command "indent xml" or "indentxml". Do you have a way to read logs ? the sublime text console just does not record anything from package installation. As I said I installed from Package Control but moving the files to Packages/User doesn't make it work either.

@alek-sys
Copy link
Owner

Ok, here are couple ideas you could check:

  1. Launch SublimeText and check console (Ctrl+~) in Windows - is there a line like "Reloading plugin \Packages\Indent XML\indentxml.py"
  2. Try to select XML, open console and type view.run_command('indentxml') - this should run command without any hotkeys
  3. Try to add keyboard shortcut to User keybindings - open Preferences - "Key bindings - User" and add you hotkey there.

Have you tried to use any other key combination? Like "super+m" - just for test?

P.S. Just checked defaul bindings for OSX and "show console" marked there as "ctrl+backquote". Not sure how it's possible not having control :)

@alek-sys
Copy link
Owner

Ok, just checked this on Mac. Installed Sublime Text and Indent XML from "Package control".
They tried super+k, super+f - and it works ok.

Just to clarify, key combination is: press super, press k (do not release super!) and press f then.
May be it looks weird but i just used to it in Visual Studio :)

Hope this helps!
Alexey.

@francoiskha
Copy link
Contributor Author

ok so the problem was basically between the keyboard and the chair. I did not understood i had to select the xml text to indent it. I think it would be cool to indent the whole file if nothing is selected. Anyway, it works, i close the issue. Thanks for investigating.

@alek-sys
Copy link
Owner

In latest version plugin will check if any text selected, if no - all current document fill be formated.

@francoiskha
Copy link
Contributor Author

I've just tested and it works like a charm. Thank you.

@jsadeli
Copy link
Contributor

jsadeli commented Nov 20, 2011

Visual Studio does this behavior using (Ctrl+K, Ctrl+D) while keeping the (Ctrl+K, Ctrl+F) reserved for current selections only. Should this do the same?

@alek-sys
Copy link
Owner

I'm not quite sure that is good to have two hotkeys for this simple plugin. For me behavior looks clear: when I press ctrl+k, ctrl+f selected text should be formated, if no text selected - all document.

@jsadeli
Copy link
Contributor

jsadeli commented Nov 21, 2011

ok, that makes sense.

@shashh666
Copy link

I'm sorry for reopening a closed case, but is there a way to use this script for indentation, edit and then go back to human unreadable form again? The indent xml works like a charm, I was wondering if there was a way to un-indent as well.

Thanks, again..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants