Sublime Forum

Is Sublime Text 2 flexible enough to allow this?

#1

Hi all,

I use Aptana Studio 3 for Ruby on Rails development but it feels heavy and is sometimes unresponsive in large projects. I started looking for a lighter editor and stumbled upon Sublime Editor 2 which looks very promising.
After some investigations, I think I can do pretty much everything in it except one thing: Git integration is very poor.

What I need for my everyday work is this kind of feature in “Folders” sidebar (screenshot from EGit, eclipse plugin):
imageshack.us/a/img121/3263/yk6d.png

  1. I need folders and files to reflect their Git status (as you can see in the screenshot)
  2. I need to be able to interact with Git using direct commands (I think it is possible with sublime-text-2-git)
  3. I need to be able to right-click on a folder and hit “Commit” to commit only files in that folder (not the whole project)
  4. I need to be able to right-click on a folder and hit “Pull” or “Push to remote” (with choice where to push)

I even opened an issue for sublime-text-2-git in Github as I am unsure if this can be done with ST2
github.com/kemayo/sublime-text-2-git/issues/204

I really hope you are going to tell me that this can be done with this editor as I really think it is the best light editor I ever saw :smile:

Thank you !

0 Likes

#2

I doubt that #1 is possible at all, and #2 is definitely possible with some plugin (I remember trying one back then, which populated the command palette with all sorts of git commands).

W.r.t. the other stuff I don’t know whether it’s possible to do with Sublime, so I’ll tell you about my workflow. Hope this might be useful.

For committing and viewing history (on per-repo, per-folder and per-branch basis) I rely on external tools. No need for something fancy, lightweight stuff like TortoiseGit on Windows and GitX on Mac will do (don’t use Linux, so don’t know). You can invoke them right from sublime by writing a custom command. Such a command can either take the name of the current file/folder to feed into a tool or can display a folder selector.

Using that plugin from #2, you’ll get pulls as well, so the only question left is how to select a remote for push. If noone supports it out of the box, it should be fairly easy to implement as a custom WindowCommand written in Python. Use a shell command to find out a list of remotes (git remote) and self.window.show_quick_panel to display a list of remotes in a simple UI within Sublime.

0 Likes

#3

For #3,4 you should be able to use SideBarGit

0 Likes

#4

You could just create a plugin that displays ‘git status’ for your project directory on some keypress

0 Likes

#5

Well, thank you for your inputs, unfortunately that’s what I thought.
Even if Sublime Text 2 is really great in lot of areas, some things just cannot be done with it.

I’ll stick with Aptana for the moment as I prefer to visually spot git status directly on files/folders, it is preferable for large projects. The IDE is meant to help us with common tasks right? I just cannot go back to console each time for such a trivial task.

Of course I’ll keep checking ST2, hopefully its customization capacity will evolve in future :smile:

Good luck!

0 Likes

#6

SublimeText 2 is not an IDE, it is a text editor. A very flexible and configurable one, but there are still necessarily things that some other program does that SublimeText can not do. Common tasks in a text editor would for me mean editing text, not running git commands. Sure, it could maybe be convenient to do that, but I personally prefer to use eiher the command line or a dedicated GUI such as GitX or SourceTree to do that. But to each his own.

0 Likes