AdvancedNewFile icon indicating copy to clipboard operation
AdvancedNewFile copied to clipboard

Configuration Issues

Open iamthesiz opened this issue 11 years ago • 10 comments

Hey there!

So I love the utility of this package but I'm having trouble getting it to work. I really really want to use it. Could you please help me out here. I'm totally going to show it off to a bunch of people. I just need to get it working properly.

Here's what I've tried:

  • Removing and re-downloading (both via package control & manually with renaming it)
  • Disabling a bunch of other packages that might have been conflicting

Any advice or suggestions?

iamthesiz avatar Feb 19 '14 07:02 iamthesiz

Hi, does anything happen when you press the key binding? Are there any errors in the ST console?

skuroda avatar Feb 19 '14 07:02 skuroda

Can you also include the version of ST you are using and the operating system . Thank you.

skuroda avatar Feb 19 '14 08:02 skuroda

Here's my info:

  • OSX
  • ST3

Here's the output from the ST terminal: Traceback (most recent call last): File "/Applications/Dev Tools/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 526, in run_ return self.run() File "/Users/alexcory/Library/Application Support/Sublime Text 3/Packages/AdvancedNewFile/advanced_new_file/commands/new_file_command.py", line 13, in run self.run_setup() File "/Users/alexcory/Library/Application Support/Sublime Text 3/Packages/AdvancedNewFile/advanced_new_file/commands/command_base.py", line 66, in run_setup self.settings = get_settings(self.view) File "/Users/alexcory/Library/Application Support/Sublime Text 3/Packages/AdvancedNewFile/advanced_new_file/anf_util.py", line 103, in get_settings for key in project_settings: TypeError: 'bool' object is not iterable

iamthesiz avatar Feb 19 '14 08:02 iamthesiz

Interesting, would you mind posting your project file? It looks like you are assigning the key AdvancedNewFile a boolean, rather than an object. Though I could be wrong about that. If that is the case, can you clarify what you are trying to do. I can likely help with getting the correct settings set up.

skuroda avatar Feb 19 '14 08:02 skuroda

I'm not trying to do anything fancy. I'm simply just trying to set it up. http://goo.gl/XxLdKv

iamthesiz avatar Feb 20 '14 06:02 iamthesiz

I'm sorry let me clarify, when I say project I mean the Sublime Text Project. You can view this by going to Project -> Edit Project. As an example, the project file will look something like this.

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "C:\\Users\\skuroda\\AppData\\Roaming\\Sublime Text 3\\Packages\\AdvancedNewFile"
        }
    ],
    "settings":
    {
        "AdvancedNewFile":
        {
            "alias":
            {
                "users": "C:\\Users"
            }
        }
    }
}

I'm guessing you have a boolean value for the "AdvancedNewFile" key rather than an object as above.

skuroda avatar Feb 20 '14 06:02 skuroda

Am I supposed to configure the path as you did for each project? Same with the settings?

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "."
        }
    ]
}

iamthesiz avatar Feb 20 '14 22:02 iamthesiz

Nope, the project is a ST thing. Essentially, each window is classified as a project, whether you save it as a project or not. The settings was just an example since, based on the exception, I thought you might have something. Have you tried to customize the settings for AdvancedNewFile elsewhere? Perhaps in Packages/User/Preferences.sublime-settings?

In the ST console, can you enter view.settings().get('AdvancedNewFile') and tell me what the result is? Since you don't have any project settings, it shouldn't return anything, but this might at least prove a setting is being set somewhere.

skuroda avatar Feb 20 '14 23:02 skuroda

view.settings().get('AdvancedNewFile') True

iamthesiz avatar Feb 23 '14 05:02 iamthesiz

Okay, so that verifies there is some view level setting that has been set, perhaps unintentionally by another plugin. Unfortunately, there are a number of places this could be. You will need to check the following locations for the settings.

  1. Packages/Default/Preferences.sublime-settings

  2. Packages/Default/Preferences ().sublime-settings

  3. Packages/User/Preferences.sublime-settings

  4. Packages//.sublime-settings

  5. Packages/User/.sublime-settings

  6. Since you are using ST3, I would assume you haven't edited those, as you would have had to use something like PackageResourceViewer or manually extract the file of interest. You can access the User syntax settings by going to Preferences -> Settings - More -> Syntax Specific.

skuroda avatar Feb 23 '14 18:02 skuroda