• Stars
    star
    2,186
  • Rank 21,109 (Top 0.5 %)
  • Language
    Python
  • Created about 13 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Side Bar Tools and Enhancements for Sublime Text. Files and folders.

Sidebar Enhancements

Description

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

Notably provides delete as "move to trash", open with.. and a clipboard.

Close, move, open and restore buffers affected by a rename/move command. (even on folders)

New file/folder, edit, open/run, reveal, find in selected/parent/project, cut, copy, paste, paste in parent, rename, move, delete, refresh....

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

Preference to control if a buffer should be closed when affected by a deletion operation.

Allows to display "file modified date" and "file size" on statusbar (may be a bit buggy).

To get rid of the stock ST menuitems create two empty files on "Preferences -> Browse Packages"

  • Default/Side Bar Mount Point.sublime-menu
  • Default/Side Bar.sublime-menu

Installation

Download or clone the contents of this repository to a folder named exactly as the package name into the Packages/ folder of ST.

Troubleshooting Installation:

  • First please note this package only adds a context menu to the "Folders" section and not to the "Open Files" section.
  • Open the package folder. Main menu -> Preferences -> Browse Packages.
  • Close Sublime Text.
  • Remove the folder "Packages/SideBarEnhancements"
  • Remove the folder "User/SideBarEnhancements"
  • Navigate one folder up, to "Installed Packages/", check for any instance of SideBarEnhancements and remove it.
  • Open ST, with Package Control go to : Remove Package, check for any instance of SideBarEnhancements and remove it.
  • Restart ST
  • Open ST, check if there is any entry about SideBarEnhancements in Package Control(in sections: "Remove Package" and just in case in "Enable Package")
  • Repeat until you find there no entry about SideBarEnhancements
  • Restart ST
  • Install it.
  • It works

F12 key

(Please note that from version 2.122104 this package no longer provides the key, you need to manually add it to your sublime-keymap file (see next section))

F12 key allows you to open the current file in browser.

url_testing allows you to set the url of your local server, opened via F12

url_production allows you to set the url of your production server, opened via ALT+F12

With absolute paths

  • Right click any file on sidebar and select: "Project -> Edit Projects Preview URLs"
  • Edit this file, and add your paths and URLs with the following structure:
{
    "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"
    }
}

With relative paths

Imagine we have a project with the following structure

Project/ < - root project folder
Project/libs/
Project/public/ < - the folder we want to load as "http://localhost/"
Project/private/
Project/experimental/ < - other folder we may run as experimental/test in another url "http://experimental/"

Then we create configuration file:

Project/.sublime/SideBarEnhancements.json

with content:

{
    "public/":{
        "url_testing":"http://localhost/",
        "url_production":"http://domain.tld/"
    },
    "experimental/":{
        "url_testing":"http://experimental/",
        "url_production":"http://domain.tld/"
    },
    "":{
        "url_testing":"http://the_url_for_the_project_root/",
        "url_production":"http://the_url_for_the_project_root/"
    }
}

...

You can create config files some/folder/.sublime/SideBarEnhancements.json anywhere.

F12 key conflict

On Sublime Text 3 F12 key is bound to "goto_definition" command by default. This package was conflicting with that key, this no longers happens. You need to manually add the keys now: Go to Preferences -> Package Settings -> Side Bar -> Key Bindings - User and add any of the following:

    [
        { "keys": ["f12"],
            "command": "side_bar_open_in_browser" ,
            "args":{"paths":[], "type":"testing", "browser":""}
        },
        { "keys": ["alt+f12"],
            "command": "side_bar_open_in_browser",
            "args":{"paths":[], "type":"production", "browser":""}
        },
        {
            "keys": ["ctrl+t"],
            "command": "side_bar_new_file2"
        },
        {
            "keys": ["f2"],
            "command": "side_bar_rename"
        },
    ]

Keybinding for Find in paths:

You may wish to add a key for opening "find in paths.."

[
    {
        "keys": ["f10"],
        "id": "side-bar-find-files",
        "command": "side_bar_find_files_path_containing",
        "args": {
            "paths": []
        }
    }
]

Notes on configuring the Open With menu:

Definitions file: User/SideBarEnhancements/Open With/Side Bar.sublime-menu (note the extra subfolder levels). To open it, right-click on any file in an open project and select Open With > Edit Applications...

  • On OSX, the 'application' property simply takes the name of an application, to which the file at hand's full path will be passed as if with open ..., e.g.: "application": "Google Chrome"
  • On OSX, invoking shell commands is NOT supported.
  • You should change Caption and id of the menu item to be unique.
//application 1
{
    "caption": "Photoshop",
    "id": "side-bar-files-open-with-photoshop",
    "command": "side_bar_files_open_with",
    "args": {
        "paths": [],
        "application": "Adobe Photoshop CS5.app", // OSX
        "extensions":"psd|png|jpg|jpeg",  //any file with these extensions
        "args":[]
    }
},

Vars on "args" param

  • $PATH - The full path to the current file, "C:\Files\Chapter1.txt"
  • $PROJECT - The root directory of the current project.
  • $DIRNAME - The directory of the current file, "C:\Files"
  • $NAME - The name portion of the current file, "Chapter1.txt"
  • $NAME_NO_EXTENSION - The name portion of the current file without the extension, "Chapter1"
  • $EXTENSION - The extension portion of the current file, "txt"

Using the External Libraries

(check each license in project pages)

Source-code

https://github.com/SideBarEnhancements/SideBarEnhancements

Forum Thread

http://www.sublimetext.com/forum/viewtopic.php?f=5&t=3331

Contributors:

Thank you so much!

Aleksandar Urosevic, bofm, Dalibor Simacek, Devin Rhode, Eric Eldredge, Hewei Liu, Jeremy Gailor, Joao Antunes, Leif Ringstad, MauriceZ, Nick Zaccardi, Patrik Göthe, Peder Langdal, Randy Lai, Raphael DDL Oliveira, robwala, Stephen Horne, Sven Axelsson, Till Theis, Todd Wolfson, Tyler Thrailkill, Yaroslav Admin

License

"None are so hopelessly enslaved as those who falsely believe they are free." Johann Wolfgang von Goethe

Copyright (C) 2014-2022 Tito Bouzout

This license apply to all the files inside this program unless noted different for some files or portions of code inside these files.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. http://www.gnu.org/licenses/gpl.html

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/gpl.html

Helpful!? Donate to support this project

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DD4SL2AHYJGBW

More Repositories

1

Dictionaries

Hunspell UTF8 dictionaries. These work with Sublime Text. [Spell check]
Python
1,476
star
2

Tag

Collection of packages about HTML/XML tags.
Python
429
star
3

BufferScroll

Remember, restore and sync scroll, bookmarks, marks, folds and cursors. keys: multiple columns one buffer, follow mode, split, screen, pages, synchronize vertical and typewriter scrolling
Python
312
star
4

WordCount

Real-time Word, Char, Line and Page counter, in the status-bar for the document, line or selection. Sublime Text
Python
290
star
5

SideBarGit

Provides Git commands for the Side Bar of Sublime Text.
Python
244
star
6

EncodingHelper

Guess encoding of files, show in status bar, convert to UTF-8 from a variete of encodings..
Python
178
star
7

Open-Include

Will open file paths found under the cursor with ALT+D
Python
133
star
8

SideBarFolders

For when a project system is too much.
Python
82
star
9

ServiceWorkerFullVideoBuffer

A service worker that buffers a full video, so when the video tag ask for ranges, these can be satisfied. Play + pause = buffer the whole video.
JavaScript
52
star
10

FindResultsApplyChanges

Edit just there in the "Find Results" buffer, merge changes back to the files.
Python
50
star
11

solid-windowed

Given a list of items, only render what's visible on the screen while allowing scrolling the whole list.
JavaScript
43
star
12

komodo-komodin-git

A komodo Git extension
JavaScript
16
star
13

Toolbar

The missing ST toolbar ( with emojis ツ )
JavaScript
14
star
14

Camaleon

Cycle chrome theme and colour schemes with F8
Python
10
star
15

PreventFakeClones

Prevents opening the same file twice, if does not share a buffer (ie is not a clone/duplicate or cloned view/tab/file).
Python
8
star
16

pota

pota is a small and pluggable Reactive Web Renderer for Reactive Libraries.
JavaScript
3
star
17

solid-media-linkify

Given a string it returns links, images, videos, audio as tags and also emojis like `🦆` as 🦆.
JavaScript
3
star
18

dom-syntax-sugar

A pluggable babel plugin for adding syntax sugar to JSX.
JavaScript
2
star
19

solid-tooltip

Directive for displaying tooltips on SolidJS components given a `title` attribute.
JavaScript
2
star
20

locationbar2-utf8

Locationbar² with full support for UTF8 URLs
CSS
2
star
21

angelia.io

WebSockets Server and Client for node.js and the browser
JavaScript
2
star
22

Android

myAPI
Java
1
star
23

on-exit

Calls functions before node exits. A node exit handler.
JavaScript
1
star
24

write-effect

It tracks changes, and deep changes on an object. Runs a callback whenever something changes, an effect.
JavaScript
1
star
25

Format

Sublime Text Plug-in for formatting code or text on selections or files via any cli formatter you wish
Python
1
star
26

kompiler

A framework agnostic compiler/transpiler currently used mostly for solidjs projects. For personal use and for friends. Forever work in progress.
JavaScript
1
star
27

dom-flair

Solve any or most html layout issues in intuitive ways via attributes without having to think much about CSS. For example <div col grow></div>. That's it.
CSS
1
star
28

komodo-tab-undo-close

A menuitem on tab context menu to reopen the last closed tab (undo close tab).
Shell
1
star
29

komodo-nav

Experimental folder browsing and bookmarks: for Komodo.
JavaScript
1
star
30

komodo-garden

many remotes, on many trees, all asynch
JavaScript
1
star
31

solid-create-effect-development

Detects possible recursion on createEffect.
JavaScript
1
star
32

server

Press F12 on any Windows Explorer folder to fire a node server. autohotkey + batch + node
JavaScript
1
star