-
Notifications
You must be signed in to change notification settings - Fork 222
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
Installed but doesn't work (shortcut conflict) #7
Comments
Hmm.. Can you press "ctrl + ~" to open up the console, and then try again in a js file and see if there is an error in the console? Thanks! |
I did: pressed ctrl+` (you meant that?), then pressed ctrl+alt+f in this file:
} });//doc ready and nothing happens.. when I browse for plugins it has been installed here: Sublime Text 2\Packages\JsFormat (12 files from Default (Linux).sublime-keymap to README.md) |
put > 5 blank lines between two lines of code in your js file, hit ctrl+alt+f and see if it reduces the number of blank lines. I'm hoping that maybe you just don't have any huge formatting errors to be corrected. The formatter that JsFormat uses does not go crazy re-doing your code, it just neatens up some glaring errors. If that doesn't shed some light on the situation, what OS and version of sublime (Help -> About ST2 -> Build #) are you on? I don't think individual package settings appear under the "Package Settings" item, just links to the Package Control settings files (could be wrong though). |
I've put about 10 blank lines between var x=1; and var x=2; and nothing happens after I press the keyboard shortcut. |
Here's the user setting file btw: { |
I've disabled some plugins, maybe that's connected in some way. |
hmm...Im on build 2165, ill get your version and see how it looks. this shouldnt have anything to do with other plugins or your package control settings |
I just updated to 2177, everything still works fine for me. I'm running out of ideas. Do you by chance have another machine or VM that you could test on? Sorry this is taking so long to resolve :( |
I've just reinstalled it and updated with ver 21.19.55 but it doesn't work. I currently don't have any other machive to test on, |
Thanks for your patience, I am very sorry we have not been able to find a resolution yet. I tested on 5-6 different machines with sublime installs yesterday, all of which worked normally (however they were all windows 7 or ubuntu). I will find an XP vm in the next day or two to test, but I cant imagine that your issue is related. I will keep this issue open and post an update if I discover anything else. |
Having the same problems in XP. |
Hmm.. I had a friend test in an XP vm a few days ago and he could not reproduce. I will try and track down an old machine with XP on it and retest myself. PAEz: can you do two things for me?
Let me know if you get any error output. |
The shortcut doesnt work, but it does from the command pallet (didnt know I could do that). |
Ok, this definitely sounds like you have another plugin installed thats stealing the default shortcut. I just tested on an xp machine with no other plugins installed (aside from package control), and it works fine. Let me know if you have any other issues. |
I am having the same problem. I looked at all the other key bindings and no other uses alt+ctr works on ctrl _ shift + p but not on keyboard shortcut. Am I doing something wrong? |
Damn, I have tested on like 15 different computers with fresh sublime installs and have never been able to reproduce this. What version of sublime and operating system are you using? |
There's an HTML tag formatter that uses the same shortcut. I was having the same problem described here. I just removed the tag package, and it fixed the problem. Here's the tag package. https://github.com/SublimeText/Tag It would be nice to be able to use both. These two packages are in conflict. It seems like someone over here was trying to solve the problem http://www.sublimetext.com/forum/viewtopic.php?f=6&t=4506#p20520 What to do. What to do. |
This is the largest problem I have run in to with sublime plugins. I don't want to change the shortcut for JsFormat for a few reasons:
This is part of the reason I started Format, so people could have an easily installed all in one formatter with a single shortcut (Format chooses the correct formatter based off file extension, then active syntax if the file buffer has no extension or hasn't been saved). Format is still a little beta, but it has support for javascript and html; its pretty stable, one of my co-workers uses it in lieu of JsFormat. Part of the reason I haven't put more time in to this is because it is hard to find pure python formatting libraries that dont suck, my parser/lexer expertise is lacking, and I really don't want people to have to install extra dependencies themselves. Maybe I just need to suck it up and learn antlr with a python target and get good with it, I dunno. I am 100% open to suggestions on how to handle this issue in JsFormat, but I don't want it to turn into a bitch fest between package maintainers with shit like "my plugin has more people watching it on github, so you should change your shortcut". So suggestions please? tl;dr: I don't have a solution off the top of my head, someone please give me one. |
Right, my point (which probably didn't come through clearly) was that the conflict was probably the root of the problem for other people's experiences. As for solutions, I think you could start by making the shortcut only work on json and js files, but since that's what you're doing with Format, sounds like you're on track. That doesn't necessarily solve the conflict problem, but it gives us a method to go to the other plugin (tag) and make the same request (only work in xml or html files, etc.). |
you were pretty clear, I'm with you. I'll spend a little time looking in to it this weekend, and see if I can start coming up with a list of other plugins with conflicting shortcuts. |
Pushed up a new branch a few days ago ('shortcut_conflict'), which enables/disables JsFormat based on the extension/syntax of the current file buffer, which is configurable in the settings. This should help prevent JsFormat from stealing the keybinding from other plugins, but it won't help with other plugins that steal the same keybinding. Have a look, send feedback. |
On MacOS X I solved remapping the default binding: [{ "keys": ["super+ctrl+alt+f"], "command": "js_format"}] |
I can confirm I have the same problem here I uninstalled "Tag" plugin, but now I get an " Instant file search" plugin messing aroung with my ctrl-alt-f keybinding (I couldn't find which plugin was that) I added { "keys": ["ctrl+alt+f"], "command": "js_format"} to my key-bindings user file and t workedubuntu 12.04 |
My guess is this worked because anything in your user key-bindings file will override any key-bindings specified by plugins.; Which would suggest that you definitely still have another plugin trying to steal ctrl+alt+f. I have added a wiki page here where we can document some of the offending plugins. Most of these probably dont implement the is_enabled override, which would fix the problem pretty easily. (JsFormat doesnt have it yet either. Its in a feature branch I haven't merged in yet) |
var obj = { comment will move to the new line |
going to go ahead and close this, its not really productive |
I've installed the plugin via Package Control,
and it's there when I list packages,
but when I press ctrl+alt+f in a .js file (jquery) nothing happens
The text was updated successfully, but these errors were encountered: