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: 11
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: 955
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: 11
Joined: Sun Apr 01, 2012 9:36 am

Re: Unexpected trailing characters ??

Postby tamilov3 on Tue Jan 13, 2015 7:31 pm

I got the same mistake, except i had 8:5 at the and, when i got into the file in the error track line i got this

Code: Select all
// Auto close tags
   { "keys": [">"], "command": "auto_close_tag", "args": { "prefix": ">"}, "context":
      [
         { "key": "selector", "operator": "equal", "operand": "text.html meta.tag -string -punctuation.definition.tag.begin.html -meta.scope.between-tag-pair.html, text.xml meta.tag -string -punctuation.definition.tag.begin.xml -meta.scope.between-tag-pair.xml", "match_all": true },
         { "key": "preceding_text", "operator": "not_regex_contains", "operand": "(?:\\<(?:img|br|hr|meta|link|base|input)\\>[^<]*)|/$" }
      ]
   },
   // Line and Tab when hitting enter between tags   
   { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
      [
         { "key": "setting.auto_indent", "operator": "equal", "operand": true},
         { "key": "selector", "operator": "equal", "operand": "meta.scope.between-tag-pair"}
      ]
   }


dont know what to change so it can load.
Can u help me pls
tamilov3
 
Posts: 1
Joined: Tue Jan 13, 2015 7:29 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 23 guests