Sublime Forum

Git features like VSCode


Thank you folks for your work. Sublime Text is a FANTASTIC editor.

I have a feature request. I know there are git plugins available… but it sure would be nice if Sublime had git features built right into the editor.

I think having it right in the gutter, just like VSCode does, would be amazing. I realize saying that probably won’t win me points, but for me, it works fantastic, and keeps me from hanging myself with all the rope that git gives you to do it with.


Sublime Text versus Visual Studio Code in 2019

Which git features does VSCode provide right in the gutter? I only see the “inserted/changed/deleted” messages there, which ST provides, too.

Or do you mean the list view on the left, with the files of the repo?



I created a video to show you what I’m talking about. Mainly that you can interact with branches and do push/pull/sync/publish right from the gutter and/or the same window. It doesn’t require you open another window (which, to me, amounts to a bit of a context switch).



I don’t see how what you are doing in the video is any different from git savvy. Also, some people might want to have support for Subversion or Mercurial. I think plugins work better in this case.



With GitSavvy, you’re not interacting with git from the gutter, that is, unless I’m not setting it up correctly. I don’t have to switch tabs/windows, it’s all right there and not a plugin.

I already have GitSavvy plugin installed, and if it’s supposed to be usable from the gutter, I do not see it. Am I doing something wrong?



1st of all lets clarify: What you mean is the statusbar. The gutter is the area where line numbers are printed.

This was the reason why I was wondering what you mean. :wink:

2nd: I like the idea to be able to interact with certain areas of the statusbar, too.

3rd: I agree with @davorin. The only thing VSCode does when clicking the statusbar icon is opening a command panel to perform the underlying operation. This is what GitSavvy can do for you, too. For many commands, you don’t need to open one of the dashboards.

Just open the command pallet and enter git:. You’ll get an overwhelming amount of commands offered, which work without changing to another view or window at all. VS Code doesn’t more in that case.

git: push
git: pull
git: stage current file and commit
git: checkout

If you miss a command, you can even create your own custom command and place it to the panel.

What I like with VS Code is the list of modified files as alternative to the normal tree view.

some people might want to have support for Subversion or Mercurial

This is a question of design. While ST packages tend to be specialized hobby projects for certain use cases, the guys behind VS Code at least seem to try to create a commonly adaptable API and infra structure. Therefore they create VCSAdapters, DebuggerAdapters or language-server-protocol to make very common interfaces available, which can be used by devs to support different languages, version control systems, debuggers, etc.

But these kind of developments require a large team of software architects to create and maintain a proper design. This will hardly be achieved by some hobby devs, even though I’d like to see something like that for ST, too.

ST core basically comes with the features required to build such things. But it would require capable and willing devs with enough spare time to make use of it the same way VSCode does.



The only thing I see missing is the badge that you can click on. The branch name and info is there in the status bar. I can open the command palette and type in git: checkout to switch branch, or git: fetch (or git: pull) to refresh from origin.



Also in VS Code you have the files that appear in a different color in the tree view depending on their git status.
There is no API to do that in ST.



An API to interact with the tree would be indeed something really useful.

Would be cool to:

  • add small buttons to the right bound to a command
  • manipulate text color
  • add an small overlay to the normal icon to indicate git state