Sublime Forum

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

#49

I’ve just downloaded it via package control on the OSX version of sublime - I get no context menus on the side bar
I’ve tried restarting sublime text 2

Is there anything else I’m missing?

0 Likes

#50

It works in folders and files under “FOLDERS” section. Is not adding nothing new to “OPENFILES”.
Try adding a new folder to the project. Project -> Add Folder To Project.

0 Likes

#51

After i updated plugin to the latest version - “F12” key binding stop working, and i get this error in console:

command: side_bar_open_in_browser {"paths": ], "type": "testing"}
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 325, in run_
    return self.run(**args)
  File ".\SideBar.py", line 1091, in run
  File ".\sidebar\SideBarProject.py", line 11, in hasOpenedProject
  File ".\sidebar\SideBarProject.py", line 25, in getProjectFile
  File ".\json\__init__.py", line 307, in loads
  File ".\json\decoder.py", line 319, in decode
  File ".\json\decoder.py", line 336, in raw_decode
  File ".\json\scanner.py", line 55, in iterscan
  File ".\json\decoder.py", line 183, in JSONObject
  File ".\json\scanner.py", line 55, in iterscan
  File ".\json\decoder.py", line 183, in JSONObject
  File ".\json\scanner.py", line 55, in iterscan
  File ".\json\decoder.py", line 183, in JSONObject
  File ".\json\scanner.py", line 55, in iterscan
  File ".\json\decoder.py", line 183, in JSONObject
  File ".\json\scanner.py", line 55, in iterscan
  File ".\json\decoder.py", line 217, in JSONArray
  File ".\json\scanner.py", line 55, in iterscan
  File ".\json\decoder.py", line 155, in JSONString
ValueError: Invalid control character at: line 491 column 7 (char 19788)

but menu command “open\run” - works fine.
what am i doing wrong?

0 Likes

#52

I’m not sure if the json created by the session file is valid. Maybe Jon can confirm? I replace the character “\t” before parsing because for some reason the decoder fails. Not sure. WTH?

0 Likes

#53

it seems the problem was in this characters

in session file
after i deleted them, “f12” works again

0 Likes

#54

No contextual menu after installing SibeBar enhancements? Any suggestion?

0 Likes

#55

Yes, add a folder to the project.

0 Likes

#56

I have installed SideBar Enhancements but the contextual menu doesn’t appear when I right-click on a file, as showed at the top of this thread. Any suggestion? If I right-click on a file, I onle see “Close”.

0 Likes

#57

Excuse my double posting. My mistake. And you’re right. The contextual menu appears after open a Folder. Thank you very much.

0 Likes

#58

So my config for setting f12 open in browser should be like this?

[code]{
“folders”:

	{
		"path": "/C/xampp/htdocs/path"
	}
],
"url": "http://localhost/",
"url_production":"http://domain.test/"

}
[/code]

0 Likes

#59

Im a Mac user. This is just what I was looking for! Thank you.

If your apps are in the /Applications directory it simply finds them. Escaping space was not needed either.

[code]
{“id”: “side-bar-files-open-with”,
“children”:

//application 1
{
“caption”: “Safari”,
“id”: “side-bar-files-open-with-safari”,

"command": "side_bar_files_open_with",
"args": {
     "paths": ],
     "application": "Safari.app", // OSX
     "extensions":"html"  //any file with these extensions
    }

},

{“caption”:"-"},

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

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

},
//application 1
{
“caption”: “ImageAlpha”,
“id”: “side-bar-files-open-with-imagealpha”,

"command": "side_bar_files_open_with",
"args": {
     "paths": "assets"],
     "application": "ImageOptim.app", // OSX
     "extensions":""  //any file with these extensions
    }

},
//application 1
{
“caption”: “ImageOptim”,
“id”: “side-bar-files-open-with-imageoptim”,

"command": "side_bar_files_open_with",
"args": {
 "paths": "assets"],
 "application": "ImageOptim.app", // OSX
 "extensions":""  //any file with these extensions
    }

}

]
}
][/code]

0 Likes

#60

Fixed a bug with the F12 “open in browser” command.

Now the location of the paths and URLs in inside the Settings folder, instead of the project file.

Please read the readme.md
github.com/titoBouzout/SideBarE … ts#f12-key

0 Likes

#61

Can you be more specific when you refer to adding the SideBarEnhancements.json file into the Settings folder? I am not finding a Settings folder in the packages directory.

0 Likes

#62

The Settings folder is located in the Packages parent folder:

…/Sublime Text 2/Packages/**…/**Settings/

0 Likes

#63

F12 to preview files in my browser has stopped working for me in the last couple of days. I’ve tried updating my packages through package control and have also manually updated SideBar, but to no avail. Hitting F12 causes a slight flicker in Sublime but the browser does not open now.

Any idea how to fix this?

Thanks.

0 Likes

#64

github.com/titoBouzout/SideBarE … ts#f12-key

0 Likes

#65

In sublime text 2 version 2.0.1, Build 2217 and I assume many versions before it uses F2 for “Next bookmark”.

This extension overrides it. I have to delete the shortcut every time the extension is updated.

Can you please change “side_bar_rename” shortcut to something that’s not used by sublime?

Thank you.

0 Likes

#66

No, F2 is rename. Sorry.

0 Likes

#67

I’m sorry but I don’t understand this.

[quote]F12 key allows you to open the current file in browser. If you want to add a url to that feature:

Open the Settings folder: …/Sublime Text 2/Packages/…/Settings/
Create a file called “SideBarEnhancements.json”
Add your paths and URLs with the following structure:[/quote]

I have to assume that …/Sublime Text 2/Packages/…/Settings/ means:

C:\Users\MyName\AppData\Roaming\Sublime Text 2\Packages\SideBarEnhancements

There isn’t a settings folder in there, so I created one and added the SideBarEnhancements.json file.

I don’t know what to put in these settings though…

{ "S:\\www\\domain.tld":{ "url_testing":"http://testing", "url_production":"http://domain.tld" }, "C:\\Users\\luna\\some\\domain2.tld":{ "url_testing":"http://testing1", "url_production":"http://productiontld2" } }

I simply want to open the file using localhost and I already have the settings you mentioned in this post setup in my project and they worked just fine until the other day…

So if I have…

[code]{
“folders”:

	{
		"path": "/E/Work/www"
	}
],
"url":"http://localhost/"

}[/code]

Do I delete these settings? What do I put in the json file now?

Thanks.

0 Likes

#68

[quote=“tito”]The Settings folder is located in the Packages parent folder:

…/Sublime Text 2/Packages/**…/**Settings/[/quote]

The Packages parent folder is simply Roaming/Sublime Text 2, so to direct people to the Settings folder in that folder why not just say Sublime Text 2/Settings ?

I’m still unclear as to what to actually put in the json file.

0 Likes