Sublime Forum

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

#25

Has there been any luck/attempt getting this plugin to work with the Side Bar “Open Files”. I poked around a little bit and it looks like the open file items are handled differently than the project files, is this true? I only get “Close” as a menu item.

Nice plugin, it definitely adds some much needed functionality.

0 Likes

#26

Nope, at some point I think “Open Files” will act in a similar way to project folders on which “Remove Folder from Project” appears but the normal menu appears too.
Regards

0 Likes

#27

[quote=“tito”]
Mr thanks for your answers!

I think I have something… please update the package
With this as the line of the application in the config file:

 "application": "/Applications/Adobe\\ CS5/Adobe\\ Photoshop\\ CS5/Adobe\\ Photoshop\\ CS5.app",

Try “open with…”

If still not working…

go to menu “view” -> “show console”
and try some of the following… until you get the file opened.
1

import subprocess; subprocess.Popen('open', '-a', '/Applications/Adobe\\ CS5/Adobe\\ Photoshop\\ CS5/Adobe\\ Photoshop\\ CS5.app', '/path/to/mypsd.psd'])

2

import subprocess; subprocess.Popen('open', '-a', '/Applications/Adobe\\ CS5/Adobe\\ Photoshop\\ CS5/Adobe\\ Photoshop\\ CS5.app', 'mypsd.psd'], cwd='/path/to/')

3

import subprocess; subprocess.Popen('open', '-a', 'Adobe\\ Photoshop\\ CS5.app', '/path/to/mypsd.psd'])

4

import subprocess; subprocess.Popen('open', '-a', 'Adobe\\ Photoshop\\ CS5.app', '/path/to/mypsd.psd'], cwd='/Applications/Adobe\\ CS5/Adobe\\ Photoshop\\ CS5/')

5

import subprocess; subprocess.Popen('open', '-a', 'Adobe\\ Photoshop\\ CS5.app', 'mypsd.psd'], cwd='/path/to/')

6

import subprocess; subprocess.Popen('open', '-a', 'Photoshop', 'mypsd.psd'], cwd='/path/to/')

7

import subprocess; subprocess.Popen('open', '-a', 'Photoshop', '/path/to/mypsd.psd'])

Hope you can open that file and tell me which command works.


I’ve some questions:
1 ) Can you open a photoshop file via “Open/Run” menuitem now? I think is fixed.
2 ) CAREFUL with this one: Is now a folder or file successfully sent to trash? If not, is there some message into the console?
Thanks in advance.[/quote]

So after a lot of trial & more error with these 7 commands, I managed to get them all working! I did have to change your commands however; none of them worked in their provided state, so I experimented - removing backslashes, spaces etc - until I finally tried the commands without any backslashes & just entered the file/app locations as they & low & behold,they worked.

I had to change 6 & 7’s app name to Adobe Photoshop CS5 as that’s how my app is named.

Just so we’re clear, here’s one of them:

import subprocess; subprocess.Popen('open', '-a', '/Applications/Adobe CS5/Adobe Photoshop CS5/Adobe Photoshop CS5.app', 'Logo.psd'], cwd='/Users/mrmartineau/Dropbox/Work/Web/Clients (Current)/Company/Logo/')

After that I thought I would toy around with the sublime-menu file, which I got working. Instead of providing the app’s location, I just provided the name (without backslashes if there are spaces etc) and it now works perfectly!! Here’s my full sublime-menu file for reference:

[code]
{“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": "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": "Espresso.app",
								"extensions":"css" //open all even folders
							}
		},
		//application n
		{
			"caption": "CSS Edit",
			"id": "side-bar-files-open-with-cssedit",

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

		{"caption":"-"}
	]
}

][/code]

If you need more info, let me know…

0 Likes

#28

Thanks,
please update and let me know if still works for you.
Also, it would be good if you can test the button “Open / Run” and let me know
Regards

0 Likes

#29

I have buid 2144 and I installed it through the package control. It worked fine on Mac (Open With menu) after replacing the Windows config with the one posted by MrMartineau on his latest reply without any change.

0 Likes

#30

This plugin has been updated:

Update v0.9:

  • Minor tweaks and fixes.
  • Fix: Re-enable move to trash for OSX
  • New: Allow to display “file modified time” and “file size” on statusbar via preferences.
  • Fix: Disable of built-in function is now automatic.
  • On the way: exclude from project, promote as project folder. ( requires restart to apply changes, looks like there is no way to reload project files.)
  • Fix: Many appends of same directory to “sys.path”
0 Likes

#31

This plugin has been updated to include the preference “close_affected_buffers_when_deleting_even_if_dirty” which is by default “False”.

This preference allow you to automatically close all the buffers affected by a deleting operation.

Regards.

0 Likes

#32

Great plugin.

In the “Open with” menu, can you move “Edit Applications” to the bottom of the sub-menu? Once I’ve set it up, I want to be able to quickly pick the first app in the list.

0 Likes

#33

Also, perhaps (via an option) the Open With menu could hide applications that are not available (i.e. because the file extension doesn’t match) instead of greying them out. I have a lot of apps listed, but for a given file type only a few options are possible.

0 Likes

#34

[quote=“craigpatik”]Great plugin.

In the “Open with” menu, can you move “Edit Applications” to the bottom of the sub-menu? Once I’ve set it up, I want to be able to quickly pick the first app in the list.[/quote]

You may want to try and let me know what you changed to get the menuitem on bottom. I cant’ see a way to do that.

[quote]Also, perhaps (via an option) the Open With menu could hide applications that are not available (i.e. because the file extension doesn’t match) instead of greying them out. I have a lot of apps listed, but for a given file type only a few options are possible.
[/quote]

Done, with new preference “hide_open_with_entries_when_there_are_no_applicable”

0 Likes

#35

I did not find a way to do it. I was hoping you could add an option so it could become possible.

0 Likes

#36

Oh, and thanks! Much appreciated.

0 Likes

#37

Update v1.1:

  • New: A boolean preference “confirm_before_deleting” which controls if a confirmation is needed before deleting.
  • New: When using pasting feature the editor will ask for “replace items” when these items exists. Note: When a folder exists the package will merge the two as in the OS.
0 Likes

#38

Hello. Excellent plugin, thanks for your hard work!

Is it possible to add hotkeys or other commands to the “Open With” functionality?

For example, double clicking a png file will open it with Photoshop instead of Sublime or hitting F12 will open a selected file or tab with Chrome.

0 Likes

#39

There is no built-in options to assign hotkeys to sidebar for the moment… and there is no way to listen clicks.

0 Likes

#40

That’s unfortunate. These would be great features.

0 Likes

#41

Thanks for the great module. I can’t figure out how to edit the menu items in a good way. I can comment out menu entries in the Packages/SideBarEnhancemenets/Side Bar.sublime-menu file, but if I copy that file to my User folder and do the same thing, weird things happen. I can change one of the captions just fine, but if I comment out a whole menu item, the file suddenly gets ignored, and defaults back to the original .sublime-menu file.

Am I doing something wrong?

0 Likes

#42

The easy and hacky way is to cut Side Bar.sublime-menu from the package and paste it into your User folder.

If you just want to change the visibility I can add a parameter. But if you want to re-order these you will have the same problem.

0 Likes

#43

Thanks that worked. Is it not the default behaviour to copy files in the User folder in order to override them? Or maybe only extend them, and that’s the problem?

Either way, yes all I wanted to do was remove items I would never use, to keep things nice and streamlined.

0 Likes

#44

Cool! Thank you very much for this enhancement.

0 Likes