Home Download Buy Blog Forum Support

SideBar Enhanc.. (Clipboard, Open With., Reload renamed)

SideBar Enhanc.. (Clipboard, Open With., Reload renamed)

Postby tito on Sat Oct 08, 2011 5:52 pm

Description
------------------

Provides enhancements to the operations on Side Bar of Files and Folders for Sublime Text 2. See: http://www.sublimetext.com/

Provides the basics: new file/folder, edit, open/run, reveal, find in selected/parent/project, cut, copy, paste, paste in parent, rename, move, delete, refresh....

The not so basic: copy paths as URIs, URLs, content as UTF8, content as data:uri base64 ( nice for embedding into CSS! ), copy as tags img/a/script/style, duplicate, open with...

All commands available for files and folders(when applicable) .

Image

<img src="http://dl.dropbox.com/u/43596449/tito/sublime/SideBar/screenshot.png" border="0"/>

Installation
------------------

* Install this repository via "Package Control" http://wbond.net/sublime_packages/package_control

Source-code
------------------

https://github.com/titoBouzout/SideBarEnhancements

Forum Thread
------------------

viewtopic.php?f=5&t=3331
Last edited by tito on Sat Feb 25, 2012 7:24 pm, edited 12 times in total.
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: SideBar Enhancements (Files)

Postby shaun on Mon Oct 10, 2011 5:43 pm

Excellent, I was just thinking about the need for something like this; thank you! Can't wait for Open With to hook GrepWin into.
shaun
 
Posts: 7
Joined: Fri Sep 30, 2011 4:52 pm

Re: SideBar Enhancements (Files)

Postby nobleach on Wed Oct 12, 2011 4:22 pm

Love the new additions. I just pulled the latest version down.

If you want to add the width/height to the IMG tag functionality, you can just do something like this in python:

Code: Select all
import Image

image_file = "foo.jpg"
img = Image.open(image_file)
# get the image's width and height in pixels
width, height = img.size


-nobleach
nobleach
 
Posts: 48
Joined: Thu Jun 23, 2011 4:14 pm

Re: SideBar Enhancements (Files)

Postby tito on Thu Oct 13, 2011 3:15 pm

nobleach, module Image is not available at ST, but I've found this from project bfg-pages which seems to work great. : )

Update v0.3:

- Fixed: Open should run correctly with some strange characters on paths
- New: "Open with.." is enabled and allows to set custom applications for different file extensions.
- New: "Copy content as Data URI" ( handy for embedding images on CSS files )
- Improved: Copy img tags now add attributes width and height thanks to project bfg-pages and suggestion from nobleach.

Wanted!
- A small contribution if you can
- Feedback from linux, mac and Windows 7 users, I tested this only on WinXP. It works? Something wrong? Something good?: P

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: SideBar Enhancements (Files, Folder, Cut, Copy, Duplicate)

Postby MrMartineau on Thu Oct 13, 2011 5:54 pm

What exactly does this mean?

Code: Select all
Open file "Sublime Text 2/Packages/Default/Side Bar.sublime-menu" and comment everything with /* here file contents */


The plugin is installed & working but I think I may be missing something because I have not sone this...

Can I also ask about adding apps to the Open with dialog? How do I do it? Here's where I'm at so far:
Code: Select all
[
   {"id": "side-bar-files-open-with",
      "children":
      [

         //application 1
         {
            "caption": "Photoshop",
            "id": "side-bar-files-open-with-photoshop",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "\\Applications\\Adobe CS5\\Adobe Photoshop CS5\\Adobe Photoshop CS5.app",
                           "extensions":"psd|png|jpg|jpeg|gif"  //any file with these extensions
                        }
         },

         //separator
         {"caption":"Espresso"},

         //application 2
         {
            "caption": "Espresso",
            "id": "side-bar-files-open-with-espresso",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "\\Applications\\ Programming\\Espresso.app",
                           "extensions":"css" //open all even folders
                        }
         },
         //application n
         {
            "caption": "CSS Edit",
            "id": "side-bar-files-open-with-css-edit",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "\\Applications\\ Programming\\CSSEdit.app",
                           "extensions":"css" //any file with extension
                        }
         },

         {"caption":"-"}
      ]
   }
]

Are the forward slashes supposed to, now, be two back slashes?

This is one of the few things that ST2 was missing, thank you so much!
@MrMartineau || Setup Sublime Text quickly: Find out all you need at https://github.com/mrmartineau/SublimeTextSetup
MrMartineau
 
Posts: 78
Joined: Thu Jul 28, 2011 8:35 am

Re: SideBar Enhancements (Files, Folder, Cut, Copy, Duplicate)

Postby tito on Thu Oct 13, 2011 6:36 pm

MrMartineau wrote:What exactly does this mean?

Code: Select all
Open file "Sublime Text 2/Packages/Default/Side Bar.sublime-menu" and comment everything with /* here file contents */

The plugin is installed & working but I think I may be missing something because I have not sone this...


Sublime already comes with the functions: "new", "rename", "delete" and "find" on context menu. These functions are included into this plugin with changes... improving a little bit... In order to hide the defaults you need to open that file and comment everything. If not, there should be two "new file", "rename", "delete".. on your menu right now
Can I also ask about adding apps to the Open with dialog? How do I do it? Here's where I'm at so far:
Code: Select all
[
   {"id": "side-bar-files-open-with",
      "children":
      [

         //application 1
         {
            "caption": "Photoshop",
            "id": "side-bar-files-open-with-photoshop",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "\\Applications\\Adobe CS5\\Adobe Photoshop CS5\\Adobe Photoshop CS5.app",
                           "extensions":"psd|png|jpg|jpeg|gif"  //any file with these extensions
                        }
         },

         //separator
         {"caption":"Espresso"},

         //application 2
         {
            "caption": "Espresso",
            "id": "side-bar-files-open-with-espresso",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "\\Applications\\ Programming\\Espresso.app",
                           "extensions":"css" //open all even folders
                        }
         },
         //application n
         {
            "caption": "CSS Edit",
            "id": "side-bar-files-open-with-css-edit",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "\\Applications\\ Programming\\CSSEdit.app",
                           "extensions":"css" //any file with extension
                        }
         },

         {"caption":"-"}
      ]
   }
]

Are the forward slashes supposed to, now, be two back slashes?


Looks good, but forward slashes is for Windows. I guess.. Mac should be "/Applications/ Programming/CSSEdit.app" I'm not sure.

To add more applications just copy and paste the last entry many times as you want.

//separator
{"caption":"Espresso"},

That's just a separator ------------, should looks like this:
//separator
{"caption":"-"},

Once you made the changes, with time, please, back here to comment if all works good for you, since I don't have a Mac system to test. Thanks

This is one of the few things that ST2 was missing, thank you so much!

You welcome Mr!
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: SideBar Enhancements (Files, Folder, Cut, Copy, Duplicate)

Postby MrMartineau on Thu Oct 13, 2011 6:53 pm

tito, thanks for you help so far but I'm afraid to say that I need some more...

My sublime-menu file now looks like this:
Code: Select all
[
   {"id": "side-bar-files-open-with",
      "children":
      [

         //application 1
         {
            "caption": "Photoshop",
            "id": "side-bar-files-open-with-photoshop",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "/Applications/Adobe CS5/Adobe Photoshop CS5/Adobe Photoshop CS5.app",
                           "extensions":"psd|png|jpg|jpeg|gif"  //any file with these extensions
                        }
         },

         //separator
         {"caption":"-"},

         //application 2
         {
            "caption": "Espresso",
            "id": "side-bar-files-open-with-espresso",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "/Applications/ Programming/Espresso.app",
                           "extensions":"css" //open all even folders
                        }
         },
         //application n
         {
            "caption": "CSS Edit",
            "id": "side-bar-files-open-with-css-edit",

            "command": "side_bar_files_open_with",
            "args": {
                           "paths": [],
                           "application": "/Applications/ Programming/CSSEdit.app",
                           "extensions":"css" //any file with extension
                        }
         },

         {"caption":"-"}
      ]
   }
]

and the apps are all shown in the sidebar, but they still do not work. The actual path for the apps, is slightly different,, for example, this is Photoshop's:
Code: Select all
/Applications/Adobe\ CS5/Adobe\ Photoshop\ CS5/Adobe\ Photoshop\ CS5.ap

but when I add that, no apps show in the 'Open with' menu...

Any ideas?
@MrMartineau || Setup Sublime Text quickly: Find out all you need at https://github.com/mrmartineau/SublimeTextSetup
MrMartineau
 
Posts: 78
Joined: Thu Jul 28, 2011 8:35 am

Re: SideBar Enhancements (Files, Folder, Cut, Copy, Duplicate)

Postby tito on Thu Oct 13, 2011 8:11 pm

If there is a backslash in that file it should be double. \\ instead of \

Question: If you selected from the menu "Open / Run" on a Photoshop file ( above of "Open with..." ) it opens the file with some application?
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: SideBar Enhancements (Files, Folder, Cut, Copy, Duplicate)

Postby tito on Thu Oct 13, 2011 8:18 pm

In theory if you type in cmd
Code: Select all
/Applications/Adobe\ CS5/Adobe\ Photoshop\ CS5/Adobe\ Photoshop\ CS5.app "/somefolderto/photoshopfile.psd"


If that is not the case... maybe this?
Code: Select all
open -a /Applications/Adobe\ CS5/Adobe\ Photoshop\ CS5/Adobe\ Photoshop\ CS5.app "/somefolderto/photoshopfile.psd"


Let me know which command works for you, I can update to check os exceptions.
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: SideBar Enhancements (Files)

Postby nobleach on Thu Oct 13, 2011 8:55 pm

tito wrote:nobleach, module Image is not available at ST, but I've found this from project bfg-pages which seems to work great. : )

Update v0.3:

- Fixed: Open should run correctly with some strange characters on paths
- New: "Open with.." is enabled and allows to set custom applications for different file extensions.
- New: "Copy content as Data URI" ( handy for embedding images on CSS files )
- Improved: Copy img tags now add attributes width and height thanks to project bfg-pages and suggestion from nobleach.

Wanted!
- A small contribution if you can
- Feedback from linux, mac and Windows 7 users, I tested this only on WinXP. It works? Something wrong? Something good?: P

Regards


GREAT, I'm loving it! Yeah, I think the lack of a full python was also biting the guy working on the Color-Picker plugin. Glad to see you found a way around it.

Thanks again for your work!

-nobleach
nobleach
 
Posts: 48
Joined: Thu Jun 23, 2011 4:14 pm

Next

Return to Plugin Announcements

Who is online

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