Victorino
Victorino

Reputation: 1641

Sublime Text # Short Code Toggle bookmark

i got linux mint 16 and sublime text 3.

and the problem is that short code of Toggle bookmark stop working.

in sublime-keymap i got this lines :

{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" }, 

all looks good, but when i'm pressing "ctrl+f2" it's not work.

what the problem is?

thanks for help !

Upvotes: 2

Views: 717

Answers (1)

cnluzon
cnluzon

Reputation: 1084

Did you put that in key-bindings-user or in key-bindings-default?

I just put it on key-bindings-user and it works perfectly fine in my sublime text. The only problem I got is that comma in the last line. If it is the last line in your key bindings you have to remove the last comma, so it looks like:

[
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" }

]

One more note: I just noticed that in my Default key bindings settings these keys are already there as default. Might it be the case that it is already in the file you edited and sublime is getting "confused" having twice a binding for f2 key?

I also tried different bindings to see if I can override it and it also works. So I would say put that on the User key bindings and be careful with the trailing comma.

Upvotes: 2

Related Questions