Sublime Forum

Image-Viewer

#1

now works only in Linux
v0.1.0

https://github.com/rmaksim/Sublime-Text-2-Image-Viewer

[size=120]View image from CSS declaration, HTML tag, and may be from something else :smile:[/size]

+ bonus: in sidebar just select for preview (or open for edit) image file and press super+i

Example
html:

<img src="img/image.png" /> | ^ cursor css:

    background: url(../img/image.png);
                            |
                            ^ cursor

Pressing the super+i opens the image viewer installed on your system by default.

Default (Linux).sublime-keymap

{"keys": "super+i"], "command": "image_viewer"} ]
support for .jpg, .png and .gif images (and .other from image_viewer.sublime-settings)

    {
        "image_types": ".jpg", ".png", ".gif"]
    }
0 Likes

Image Viewer?
Image Viewer?
#2

Cool library I may use it for something, thanks for sharing. :smiley:
Look, with SideBar Enhancements you can rigth click the image and select “Open/Run” which will open the image with the default image viewer/editor.
Regards

0 Likes

#3

Cool!!!
Thank you very much for SideBar Enhancements.
I have new idea…

0 Likes

#4

UPDATE: v0.1.0

Thanks to the library “desktop” (which has been used successfully in the SideBar Enhancements) images now open in your favorite image viewer.

View image from CSS declaration, HTML tag, and may be from something else - see description above

0 Likes

#5

I think is a better idea to add the desktop to “Open-Include” plugin which already try the best to resolve the location of the files.
You can check if the included file is an image and load it with desktop.
github.com/SublimeText/Open-Include

Thoughts?

[2 cents]

0 Likes

#6

Oh, sorry, temporarily no thoughts about this plug-in (

0 Likes

#7

I always get:

Image-Viewer
ERROR: Image type is not recognized:

on regular PNGs

running ubuntu 11.10 + latest sublime

0 Likes

#8

[quote=“localgrr”]I always get:
Image-Viewer
ERROR: Image type is not recognized:
on regular PNGs
running ubuntu 11.10 + latest sublime[/quote]

Could you provide a sample of the code you are using (or screenshot)

0 Likes