Home Download Buy Blog Forum Support

Unexpected trailing characters ??

Unexpected trailing characters ??

Postby kjemmo on Thu Apr 05, 2012 9:07 am

Just starting to learn how to modify this great tool.

I seem to run into this problem a lot:

Sublime Text 2
---------------------------
Error trying to parse settings: Unexpected trailing characters in C:\Users\Gregory\AppData\Roaming\Sublime Text 2\Packages\User\Preferences.sublime-settings:4:2


Here is the code I was trying to save:
Code: Select all
{
   "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
   "font_size": 12
},
{
   "caption": "Reg Replace: Fold sentence blocks",
   "command": "reg_replace",
   "args": {"replacements": ["fold_sentence-blocks"], "action": "fold"}
},
{
   "caption": "Reg Replace: Unfold sentence blocks",
   "command": "reg_replace",
   "args": {"replacements": ["fold_sentence-blocks"], "action": "unfold"}
}


How do I correct this?
kjemmo
 
Posts: 10
Joined: Sun Apr 01, 2012 9:36 am

Re: Unexpected trailing characters ??

Postby bizoo on Thu Apr 05, 2012 9:24 am

kjemmo wrote:
Code: Select all
    {
       "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
       "font_size": 12
    },
    {
       "caption": "Reg Replace: Fold sentence blocks",
       "command": "reg_replace",
       "args": {"replacements": ["fold_sentence-blocks"], "action": "fold"}
    },
    {
       "caption": "Reg Replace: Unfold sentence blocks",
       "command": "reg_replace",
       "args": {"replacements": ["fold_sentence-blocks"], "action": "unfold"}
    }

I suppose you mix different things in the same file.

It must probably be:
Preferences.sublime-settings:
Code: Select all
    {
       "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
       "font_size": 12
    }

Default.sublime-commands:
Code: Select all
[
    {
       "caption": "Reg Replace: Fold sentence blocks",
       "command": "reg_replace",
       "args": {"replacements": ["fold_sentence-blocks"], "action": "fold"}
    },
    {
       "caption": "Reg Replace: Unfold sentence blocks",
       "command": "reg_replace",
       "args": {"replacements": ["fold_sentence-blocks"], "action": "unfold"}
    }
]
bizoo
 
Posts: 873
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Unexpected trailing characters ??

Postby kjemmo on Thu Apr 05, 2012 10:19 am

Thanks.

That was it. Works now.
kjemmo
 
Posts: 10
Joined: Sun Apr 01, 2012 9:36 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 19 guests