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

.tmPreferences files to override Installed Packages files are not correctly loaded #411

Closed
FichteFoll opened this Issue Aug 10, 2014 · 4 comments

Comments

2 participants
@FichteFoll
Member

FichteFoll commented Aug 10, 2014

Take 1

Steps to reproduce

  1. Open a file with CSS syntax and enter a single word.

  2. Enter view.meta_info("cancelCompletion", view.sel()[0].a) in the console, it should read '.*'

  3. Create folder Packages/CSS

  4. Create file Completion Rules.tmPreferences with contents (for reference, the original file has .* inbetween the string tags):

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
          <key>scope</key>
          <string>source.css meta.selector</string>
          <key>settings</key>
          <dict>
              <key>cancelCompletion</key>
              <string></string>
          </dict>
      </dict>
      </plist>
  5. Repeat step 2 (after an optional restart)

Expected result

The console should read ''.

Actual result

The console reads '.*' again.

Take 2

Steps to reproduce

  1. Same as above, but additionally:

  2. Create a file named CSS Completion Rules.tmPreferences in the User package with contents:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
          <key>scope</key>
          <string>source.css meta.selector</string>
          <key>settings</key>
          <dict>
          </dict>
      </dict>
      </plist>
  3. Repeat the initial step 2 from take 1.

Actual and Expected result

generating meta info summary
>>> view.meta_info("cancelCompletion", view.sel()[0].a)
''

Note: generating meta info summary only and always appears when saving the tmPreferences file in the User dir, even without doing changes. Only then changes in the Packages/CSS/Completion Rules.tmPreferences file are recognized.

Initially discovered while investigating #283.

@FichteFoll FichteFoll changed the title from .tmPreferences files in Installed Packages are not correctly overridden to .tmPreferences files to override Installed Packages files are not correctly loaded Aug 10, 2014

@russelldavis

This comment has been minimized.

russelldavis commented Mar 18, 2016

I ran into this issue trying to override Miscellaneous.tmPreferences in the Ruby package. Since the file under User has to be saved as a trigger, while the file under Packages/Ruby is the one that actually gets loaded, a nice workaround is to make a symlink at Packages/Ruby/Miscellaneous.tmPreferences that points to User/Ruby Miscellaneous.tmPreferences. Then, you can just edit either file, save the change, and restart sublime for it to take effect. (For me, the restart is required.)

@FichteFoll

This comment has been minimized.

Member

FichteFoll commented Mar 18, 2016

@russelldavis there is a notice of an issue with .tmPreferences not being loaded to be fixed in the latest 3109 release. Could you test if this still occurs there?

@russelldavis

This comment has been minimized.

russelldavis commented Mar 18, 2016

Awesome, that totally fixed it (what timing!).

@FichteFoll FichteFoll closed this Mar 28, 2016

@FichteFoll FichteFoll added R: fixed and removed R: maybe fixed? labels Mar 28, 2016

@FichteFoll FichteFoll added this to the Build 3109 milestone Mar 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment