-
Notifications
You must be signed in to change notification settings - Fork 68
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
Default Keymap Not Extracting #20
Comments
Hi mvastola, |
@kairyou, so that fixed the issue with the default keybindings not installing, (FWIW, I have ST3 and I'm pretty sure all plugins update automatically. Or at least this one did.) but not the issue with the paths I identified in the second bullet. Choosing This is because, according to the documentation, Sublime collects all The current setup is problematic because it would tend to have the user put all their custom keymaps in a global keymap file. It would seem the correct place to put the keymaps for a plugin is in a plugin-specific file. One large reason for this is because there's no way easily disable all the keymaps for a given plugin. If I wanted to disable all of the default keymaps for this plugin so as to allow all the default keymaps for another plugin work normally (assume there were some conflicts might conflict), there's no real way to do that without re-declaring all the default keymaps for the latter plugin in my personal custom keymap file. It's far cleaner though to just edit I would have to check this, but while this plugin has an option to disable its keymaps, it would seem that it wouldn't work as intended. Yes, the key combos should stop triggering actions in this plugin when that option is set, but neither will they be able to trigger actions in other plugins because in Sublime's thinking, they are still assigned to this one. |
That was a really long comment, so here's a shorter version containing just my suggested resolution:
|
Also, feel free to, before releasing this publicly, let me know when you've done this (or something similar) as I'd be happy to test. |
That is a good idea :) |
Have you tried this? See the third link I cited (each word in "according to the documentation" above was a different link): http://docs.sublimetext.info/en/latest/extensibility/packages.html#customizing-or-overriding-packages. Especially the warning box. The entire purpose of the defaults file is to not be editable, so I wouldn't comment anything out there. At first I misunderstood your comment and I thought you were talking about keymaps that might be set in |
Sublime's |
That link says "Files in override packages override entire files." That doesn't describe |
You can creat the file |
I'll play with this a bit and see what I can figure out. |
Hi @kairyou,
Thanks for this plugin. Really tiny bug, but in sublime-tmpl.py the
file_list
array is missing your default keymap file. This is causing it to never be extracted from the package.Is there any way you could fix this? (BTW, I suspect this is actually the source of the problem the user in #11 reported experiencing.)
Also, two other related things I'm noticing, having just installed this plugin:
When I try to open the default keymap file (which currently doesn't exist) the path that the latest ST3 opens is
~/.config/sublime-text-3/Packages/SublimeTmpl/Default (Linux).sublime-keymap
. Particularly, your keymap file doesn't have the(Linux)
in it.I'm not 100% sure if this matters or if Sublime would automagically fall back to the other path if it existed (I should probably check) and I know this should be a cross-platform plugin, but it's worth mentioning in case these files are all supposed to have the OS in them now.
Along the same lines -- though a slightly different quirk -- is that when choosing to open the user keymap file, the path
~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-keymap
is opened for me.I mention this because I can only assume that you need to create at least a blank file custom to
SublimeTmpl
to prevent it from falling back to the global. (Interestingly, for some reason this fallback doesn't occur with the user settings file, which opens as~/.config/sublime-text-3/Packages/User/SublimeTmpl.sublime-settings
, but I'm guessing that's because I don't have a file named~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-settings
.)The text was updated successfully, but these errors were encountered: