Home Download Buy Blog Forum Support

Is Sublime Text 2 flexible enough to allow this?

Is Sublime Text 2 flexible enough to allow this?

Postby astronaute on Mon Oct 01, 2012 7:04 pm

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):
http://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
https://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 :)

Thank you !
astronaute
 
Posts: 3
Joined: Mon Oct 01, 2012 6:49 pm

Re: Is Sublime Text 2 flexible enough to allow this?

Postby xeno.by on Mon Oct 01, 2012 9:12 pm

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.
xeno.by
 
Posts: 104
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: Is Sublime Text 2 flexible enough to allow this?

Postby Soulsbane on Tue Oct 02, 2012 2:42 am

For #3,4 you should be able to use SideBarGit
Soulsbane
 
Posts: 4
Joined: Sun Aug 05, 2012 9:18 pm

Re: Is Sublime Text 2 flexible enough to allow this?

Postby impeached on Tue Oct 02, 2012 1:29 pm

You could just create a plugin that displays 'git status' for your project directory on some keypress
impeached
 
Posts: 20
Joined: Mon Nov 14, 2011 11:18 pm

Re: Is Sublime Text 2 flexible enough to allow this?

Postby astronaute on Tue Oct 02, 2012 2:27 pm

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 :)

Good luck!
astronaute
 
Posts: 3
Joined: Mon Oct 01, 2012 6:49 pm

Re: Is Sublime Text 2 flexible enough to allow this?

Postby svenax on Wed Oct 03, 2012 10:29 pm

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.
svenax
 
Posts: 142
Joined: Tue Dec 20, 2011 12:47 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 34 guests

cron