Sublime Forum

Getting Hover Image Preview to Work

#1

Hello, I’ve installed this ImagePreview package, but I am unsure how to bind the “preview_image” command to a key or a mouse gesture, as said in the description. Can anyone help me, how should I bind it? I’ve been using Sublime for a while now, but I’ve never done this sort of thing before.

0 Likes

#2

You want to choose Preferences: Key Bindings from the command palette or the main menu to open the key bindings window.

The pane on the left is the default key bindings and the one on the right is your user key bindings. Add a binding inside of the [] characters. For example:

    { "keys": ["ctrl+alt+1"], "command": "preview_image" },

You would choose whatever key you want to use for this. Make sure that all of the bindings are separated by commas. As soon as you save the file, the change is active.

I’m not familiar with this package, but from a quick read it looks like the key binding will only work in places the context menu would work, which means the cursor needs to be inside of an appropriate location before the binding will work.

I have a video that covers how key bindings work that provides some extra information on how this all works, if you’d like more background.

0 Likes

#3

Oh, I thought I needed to key bind for the plugin to work, now I discover that the actual plugin just doesn’t work at all.

Thanks for the info anyway.

0 Likes