Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3660502
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:12:49+00:00 2026-05-19T01:12:49+00:00

The one feature that has kept me an Eclipse user is that each time

  • 0

The one feature that has kept me an Eclipse user is that each time you hit save, a copy of it goes into the Eclipse local history. Then you can do a diff on local history.

Still, I’d like to use Textmate since I heard such great things about it. I know there’s a feature request for a future version…but I’m wondering if someone has found a plugin, or some other way to get this functionality shoehorned into Textmate now? I know it’s a longshot but never hurts to ask.

Thank you.

UPDATE!
(Edited the title of the question since the previous title got no interest)
I just realized that perhaps this can be a solution. Is it possible to hook the Textmate save into a git commit?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:12:49+00:00Added an answer on May 19, 2026 at 1:12 am

    What you want is this: Create a new command, set “Save” to “Current File” (this option is above the text area), “Input” to “Entire Document” and “Output” to “Show as Tool Tip”. Now copy the code below into the text area and assign Command-S as the commands key-binding.

    #!/usr/bin/env ruby
    filename = ENV["TM_FILEPATH"].split("/").last
    `git add #{ENV["TM_FILEPATH"]}`
    `git commit -m "#{filename}"`
    

    Every time you type in Command-S the file will be saved and committed to an (already existing) git repository. If the file wasn’t changed, no commit will be done, because git will block the commit.

    Below I have extended the command to pop up a dialog for the commit message and to give a nice warning, if no git repository was found. You should be able to figure out the rest yourself. 🙂

    #!/usr/bin/env ruby
    require ENV['TM_SUPPORT_PATH'] + '/lib/ui'
    
    filename = ENV["TM_FILEPATH"].split("/").last
    message = TextMate::UI.request_string(
        :title => "Commiting changes of #{filename}",
        :prompt => "Please enter the commit message for your changes."
    )
    
    add = `git add #{ENV["TM_FILEPATH"]} 2>&1`
    commit = `git commit -m "#{message}" 2>&1`
    
    git_answer = add + commit
    unless git_answer.grep(/fatal/).empty?
      puts "Please initialize git repository first!"
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of the nice feature of the Image control is that we can specified
we use an application that has an export to excel feature that doesn't work
My employer is currently trying out Fogbugz and one feature that would be nice
One feature of Threads is that you can set the .IsBackground property to true,
I have developed an application that has a list of items in one frame;
I need to have an entity that has two separate candidate keys where one
I have a feature that gets the record for specific id and has two
One of Delphi 2009's advertised features was PNG support. That's great, because the Unicode
I have a pure Winapi application that needs a few new features. One of
One of the feature requests I've got for the program I'm working on is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.