Home Download Buy Blog Forum Support

Two Sublime Text X Issues

Two Sublime Text X Issues

Postby guillermooo on Sun Dec 26, 2010 10:47 pm

I've found the following:

Editing Windows.sublime-keymap file won't work, Sublime complains it got an unexpected character. I've noticed too that Sublime X uses Linux line ends for that file on Windows. Is that required now?

Graphical issue (see att.):

The current line's gutter number background isn't filled when the line's selected. Instead, the number's drawn inside a darker rectangle.
Capture.PNG (2.02 KiB) Viewed 1068 times
Posts: 730
Joined: Thu Jul 23, 2009 9:06 am

Re: Two Sublime Text X Issues

Postby jps on Mon Dec 27, 2010 3:00 am

The sublime-keymap files need to be strict JSON - the likely error is that you have a trailing comma at the end of a list, e.g., [1, 2, 3,], which isn't allowed. I make this mistake all the time when editing them: I'd gladly remove this restriction, but then Python's JSON parsing module wouldn't accept the files, so it may not be the best long term trade-off (As an aside, I just realised I presently allow comments in JSON files, but shouldn't - I'll change this).

I'll improve the error reporting of invalid JSON files for the next release: currently a nice message about which line and column the syntax error is on is generated, and then discarded, because the console isn't up at that point to capture it.

I'll also fix the graphical error for the next version.
Site Admin
Posts: 3082
Joined: Wed Mar 19, 2008 12:33 pm

Re: Two Sublime Text X Issues

Postby guillermooo on Mon Dec 27, 2010 10:36 am

I think I got confused there. Sublime reports "got unwanted character: <garbage char>" in the console when I press CTRL + K or any other CTRL + key without an associated key binding. This seems to be unrelated to keymap files. Python's console ignores this particular control character.

Then I've noticed the following about keymap files:

- They must be reloaded in order to work upon changing. I've successfully remapped keys in the default Windows keymap file, but only after restarting Sublime.

- Sublime won't pick up any other Windows.sublime-keymap files I create under Packages\User. sublime.options().get("keymap") doesn't provide any info, because app options don't seem to be implemented yet, but I suppose the default keymap file name under Windows should be Windows.sublime-keymap and not Default.sublime-keymap? I've tried both anyway and neither of them worked for me.

And re. JSON, I'm fine with it being so strict. I laughed quite a bit when seeing Crockford's video about the discovery of JSON. :D

Posts: 730
Joined: Thu Jul 23, 2009 9:06 am

Return to Technical Support

Who is online

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