Home Download Buy Blog Forum Support

Image-Viewer

Image-Viewer

Postby rmaksim on Mon Jan 09, 2012 10:16 pm

now works only in Linux
v0.1.0

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

View image from CSS declaration, HTML <img> tag, and may be from something else :)

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

Example
html:
Code: Select all
    <img src="img/image.png" />
                |
                ^ cursor
css:
Code: Select all
    background: url(../img/image.png);
                            |
                            ^ cursor

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

Default (Linux).sublime-keymap
Code: Select all
    [
        {"keys": ["super+i"],  "command": "image_viewer"}
    ]

support for .jpg, .png and .gif images (and .other from image_viewer.sublime-settings)
Code: Select all
    {
        "image_types": [".jpg", ".png", ".gif"]
    }
Last edited by rmaksim on Sun Jan 15, 2012 9:46 pm, edited 3 times in total.
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: simple Image-Viewer (if PIL is installed)

Postby tito on Mon Jan 09, 2012 11:17 pm

Cool library I may use it for something, thanks for sharing. :D
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
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: simple Image-Viewer (if PIL is installed)

Postby rmaksim on Sat Jan 14, 2012 6:03 pm

tito wrote:you can rigth click the image and select "Open/Run" which will open the image with the default image viewer/editor.

Cool!!!
Thank you very much for SideBar Enhancements.
I have new idea...
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: Image-Viewer

Postby rmaksim on Sun Jan 15, 2012 9:44 pm

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 <img> tag, and may be from something else - see description above
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: Image-Viewer

Postby tito on Sun Jan 15, 2012 11:34 pm

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.
https://github.com/SublimeText/Open-Include

Thoughts?

[2 cents]
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Image-Viewer

Postby rmaksim on Tue Jan 17, 2012 8:13 pm

tito wrote:Thoughts?

Oh, sorry, temporarily no thoughts about this plug-in (
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: Image-Viewer

Postby localgrr on Fri Jan 20, 2012 12:40 pm

I always get:

Image-Viewer
ERROR: Image type is not recognized:

on regular PNGs

running ubuntu 11.10 + latest sublime
localgrr
 
Posts: 1
Joined: Fri Jan 20, 2012 12:39 pm

Re: Image-Viewer

Postby rmaksim on Fri Jan 20, 2012 1:53 pm

localgrr wrote:I always get:
Image-Viewer
ERROR: Image type is not recognized:
on regular PNGs
running ubuntu 11.10 + latest sublime

Could you provide a sample of the code you are using (or screenshot)
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 14 guests