Sublime Forum

SideBarGit

#1

Hi there,

I ported my JavaScript extension Komodin for Sublime Text as I want to learn Pyton. I wrote Komodin to learn Git.

I tested it only on WindowsXP, I think should work on Linux on same way
Let me know if you found some problem or if you want to add some command.

I know there is already some efforts into proving Git support, I don’t want to disturb there, this provides to many commands and is just a textual port.
There is nice presentations of data from the Git plugin that can be used by this plugin, I’ll look there later.

Regards,


Description

Provides Git commands on Side Bar of Files and Folders for Sublime Text 2. For sublime text see: sublimetext.com/

It should work with files names and messages in any language.

This plugin is a port of the “Komodin” extension for komodo edit. See: github.com/titoBouzout/komodo-komodin-git

Usage

  • Right click on “multiple/single” “files/folders” of the “tree” sidebar to apply commands on selected files which maybe are from different repositories.

  • To apply commands to focused document use the buffer context menu.

Provides the following commands

Installation

Todo

  • Tag commands not yet ported

Source-code

github.com/SublimeText/SideBarGit

Forum Thread

viewtopic.php?f=&t=XXXXXX

Contribute

[Consider make a contribution](paypal.com/cgi-bin/webscr?c … aNonHosted )

0 Likes

Git/scm status in gutter?
#2

This is an awesome plugin Tito! Though, I really need to play with it to confirm that it works well, but I really like the side-bar integration and hope to use it as an example. I help admin the SublimeText org, and would like to see if I can push this to create a standard-ish framework for SCM integration. Thanks for the contribution!

0 Likes

#3

You welcome, this plugin uses the classes SideBarSelection, and SideBarItem originally created for “SideBar Enhancements” plugin.

**SideBarSelection **takes a list of paths as arguments at let you know some “properties” of that paths ( hasDirectories, hasFiles, hasOnlyDirectories, hasFilesWithExtension, etc )
**SideBarItem **is for manage a path ( directory or file ) in many ways (get path with file system encoding, copy, rename, move, delete, get mime, content, etc )
**SideBarGit ** class has method getSelectedRepos ( which should be moved to class SideBarSelection at some point) that given a list of paths it returns the paths of the git repos found on that list.

I’m all in to use it as a framework to do anything related to files or directories “in the right way”, btw, still under testing and probably needs little tweaks. It would be nice if we can add these classes (SideBarSelection and SideBarItem ) to the “Default” package.

_

About creating standard-ish framework for SCM integration is hard, because different SCMs provide different options and features…

Regards

0 Likes

#4

Under OSX, some things work, some things don’t.

I’ve added /usr/local/git/bin to my $PATH, yet the command Add & Commit & Push gives me the error:

Git: No such file or directory
Possible error:
git push not found on $PATH

Working manually through the command line works fine.

0 Likes

#5

Thanks for reporting.

After upgrading to latest version, can you tell if some command is not working?

0 Likes

#6

Works!

Just need new/delete branches etc.

0 Likes

#7

Small update:

  • If a command sends output to a tab ( example a diff ), hitting F5 on that tab: will execute the command again and refresh the tab with the new contents ( example the new computed diff )
0 Likes

#8

Nice!

Are sidebar icons on the roadmap, or do those require core ST changes?

0 Likes

#9

Probably these require core ST changes

0 Likes

#10

Blamed lines can use markers.

Or differences can use region markers?

0 Likes

#11

Can you please elaborate, with examples if possible, not sure what are you talking about, improvements welcome!

0 Likes

#12

I’m too lazy to write a basic example, but you can check out this.

0 Likes

#13

I don’t know what do you want to highlight. On a diff I may imagine character differences? on blame??

0 Likes

#14

I’d say differences. Green markers for additions, red for removals :smile:

0 Likes

#15

Color schemes already highlight that! ¿? dl.dropbox.com/u/9303546/Sublime … t/diff.png

0 Likes

#16

Where can I get this diff syntax file from?

0 Likes

#17

[quote=“jbrooksuk”]

Where can I get this diff syntax file from?[/quote]

Oh :frowning: The Oblivion theme doesn’t work with Diff. Better fix that!

Sorted it :smile: github.com/jbrooksuk/Oblivion/

0 Likes

#18

Add these two below diff header to differentiate files names:

<dict> <key>name</key> <string>⎇ diff.context</string> <key>scope</key> <string>meta.diff.header.from-file</string> <key>settings</key> <dict> <key>foreground</key> <string>#9bsedd</string> </dict> </dict> <dict> <key>name</key> <string>⎇ diff.context</string> <key>scope</key> <string>meta.diff.header.to-file</string> <key>settings</key> <dict> <key>foreground</key> <string>#9bdedd</string> </dict> </dict>

PS: I’ve sent a pull request to your repo: github.com/SublimeText/Open-Include

0 Likes

#19

I’m using Cygwin’s git on windows. Other sublime git plugins work fine but this one shows this error when I try to run a command.

‘git’ is not recognized as an internal or external command,
operable program or batch file.

0 Likes

#20

Add it to your path

%SystemRoot%\system32;C:\cygwin\bin;…

0 Likes