Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Aug 16, 2010
  1. Use GCC 4.0, change SYMROOT

    authored
    GCC 4.2 is not compatible with 10.4 SDK.  SYMROOT was set to "../build" so
    change it to "build".
  2. Apply C. Eidhof, O. Lempsink patches

    authored
    This enables the input manager to be used by any ODB capable editor.
Commits on Feb 22, 2008
  1. @sorbits

    Use selectLine instead of selectAll for locating textarea

    sorbits authored
    If no textarea (or other text input field) is active when you select
    Edit in Textmate…, then the selectAll call will highlight the entire
    webpage. Ick. selectLine seems to workout better.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@8985 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  2. @sorbits

    Ensure we send back to the same text area as we took the text from

    sorbits authored
    Save the TextArea object in the options dictionary and then pass
    it back to textMateDidModifyString so that the text always goes
    back to whence it came.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@8984 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  3. @sorbits

    Set line number correctly for textareas

    sorbits authored
    Previously when editing a textarea, the line number was always set
    to zero (the first line). We now count the line numbers correctly so that
    the caret appears on the correct line within TextMate.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@8983 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  4. @sorbits

    Fix issue with locating textarea among multiple textareas

    sorbits authored
    Previously if there were multiple textareas the selection logic
    failed if the textarea were empty or already fully selected. As
    a workaround, any such areas are temporarily set to an a
    single space (' '). This gives something for selectAll to work on
    (or clears an active selection). After locating the textarea, we
    then restore the previously value.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@8982 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  5. @sorbits

    Fix for sites w/multiple frames (Gmail)

    sorbits authored
    Edit in TextMate wasn't working for me with Gmail, at least under
    10.5. I believe this is due to Gmail using multiple frames. We now
    try using selectedFrame if the WebView responds to that, otherwise
    we just try the mainFrame and all children frames to see if any have
    an active textarea.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@8981 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  6. @sorbits

    Fix LDFLAGS compile error under 10.5

    sorbits authored
    "-undefined define_a_way" is apparently "-undefined dynamic_lookup"
    under 10.5.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@8980 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Jul 25, 2007
  1. @sorbits
Commits on Jul 8, 2007
  1. @sorbits

    • occasionally a space would be missing between two words when invoke…

    sorbits authored
    …d from Mail (because of the DOM using two sibling nodes for one text-run)
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@7715 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Jun 29, 2007
  1. @sorbits

    • disable exceptions, run-time type info, and make symbols hidden — 1…

    sorbits authored
    …5% smaller executable…
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@7636 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  2. @sorbits

    [NEW] Added support for OmniWeb 5.6 — this support *may* include Safa…

    sorbits authored
    …ri 3, but I have only tested WebKit.app with which the text can’t be sent back due to problems with apple events (presumably related to the executable and bundle ID referencing WebKit and the running process being called Safari). The way the active text area is found is a heuristic and may fail (except for OmniWeb) see the source for details. The default key equivalent (⌃⌘E) has no effect, this seems to be a WebKit problem and the solution is to add a binding for editInTextMate: to your DefaultKeyBinding.dict or change the Edit In TextMate’s key via the Keyboard & Mouse pane in System Preferences
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@7635 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Feb 19, 2007
  1. @sorbits

    • use precomposedStringWithCanonicalMapping on the file name when usi…

    sorbits authored
    …ng it as a key in the dictionary storing info about open files (as the file name we get from resolving the alias might be decomposed, when it was initially precomposed vice versa)
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@6604 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Oct 31, 2006
  1. @sorbits

    • change didModifyString: method to textMateDidModifyString:

    sorbits authored
    • prefix NSString category methods with “TM_”
    
    This to prevent clashes with other programs which add category methods.
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@5822 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Oct 9, 2006
  1. @sorbits

    • send undo to the WebView’s undo manager after having inserted the c…

    sorbits authored
    …aret marker (to figure out where the caret is located, which there seems to be no other way to do), so that if the user cancels the edit, he is not stuck with this caret marker
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@5407 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Jul 6, 2006
  1. @sorbits

    • replace use of stringWithContentsOfFile:encoding:error: with initWi…

    sorbits authored
    …thData:encoding: so that it (presumably) works with Panther
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@4032 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Jul 3, 2006
  1. @sorbits

    • augment the default URL mappings with those found in ~/Library/Pref…

    sorbits authored
    …erences/com.macromates.edit_in_textmate.plist — this is a plist with one key at the root level (URLAssociations) which should hold the associations. The key in this dictionary is the URL substring and the value is the extension to use.
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@3992 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  2. @sorbits

    • use NSClassFromString rather than assume WebFrameView is defined

    sorbits authored
    • use the longest match in the URL map
    • if sending back the modified document to the calling application fails, then instead of removing the temporary file on close, it is revealed in Finder
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@3991 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Jul 2, 2006
  1. @sorbits

    • if a parent view to the one from which “Edit in TM” is invoked is a…

    sorbits authored
    … WebFrameView then grab the URL from that view and use the ‘url map’ to find an extension for the temporary file given to TextMate — this allows e.g. edits initiated from gmail to use mail syntax, from macromates.com/blog/ to use Markdown, from the Quicksilver forum to use BBCode etc.
    
    Currently the url map is only read from the bundle containing the Edit in TM input manager — it should probably also be read from somewhere under ~/Library
    
    This hack works for both OmniWeb and Safari. Should work for all WebKit-based browsers.
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@3962 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Jun 9, 2006
  1. @sorbits

    • will no longer freeze when caret is at the last column of the last …

    sorbits authored
    …line in a NSTextview
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@3592 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on May 26, 2006
  1. @sorbits

    • when initiating an edit, TextMate will open the text with the caret…

    sorbits authored
    … placed on the same line as the calling text / web view
    
    I didn’t find any interface for getting the line number from the web view, so instead I insert a unicode replacement character and look for this — this has the disadvantages that if the text is not replaced (i.e. saved from TM), this code point will stay in the text (it will be visible)
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@3426 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Apr 15, 2006
  1. @sorbits

    • lines ending with ‘>’ (without a trailing space) now also have that…

    sorbits authored
    … last character count toward the quoting level when sending back the text to Mail
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@3036 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Apr 6, 2006
  1. @sorbits

    • select the menu with most of the typical Edit menu actions (rather …

    sorbits authored
    …than the first) since Michael Sheets spotted that Software Update actually got this item added to its Update menu :)
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2962 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Mar 26, 2006
  1. @sorbits

    • add the “Edit in TextMate” action to the first menu which contains …

    sorbits authored
    …a menu item with an undo, redo, cut, copy, paste, delete, or select all action.
    
    This should cause it to work for those who do not have English menu titles.
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2898 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Feb 9, 2006
  1. @sorbits

    • encapsulate the changing of the text view text in shouldChangeTextI…

    sorbits authored
    …nRange:replacementString: and didChangeText (should trigger whatever notification the application may use)
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2689 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Jan 3, 2006
  1. @sorbits

    • the Edit in TextMate input manager now install a menu item in the E…

    sorbits authored
    …dit menu so that users do not have to setup key bindings by default (though the menu item can be disabled and standard key bindings still work)
    
    • created a “web application” to create the symbolic link (i.e. performing the installation) — this may seem like a bit of a Frankenstein creation, but it's pretty simple (just a markdown document with an <input>-button that has a JavaScript event handler which creates the link, and even does somewhat graceful error handling and provides the user with installation feedback)
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2525 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Dec 4, 2005
  1. @sorbits

    • check if TextMate is already running before launching it — sometime…

    sorbits authored
    …s the system starts another build of TM on my system, even when TM is already running, so this is an attempt of a workaround
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2394 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Nov 28, 2005
  1. @sorbits

    • make the NSTextView category use insertText: to trigger proper edit…

    sorbits authored
    … notifications
    
    • cleanup (remove) temporary files after editing
    • ensure the temporary file is not overwriting an existing (identically named) temporary file
    • only install AppleEvent handlers while there are outstanding edits
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2312 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Commits on Nov 27, 2005
  1. @sorbits

    • moved a few things out into NSString categories to make the html ->…

    sorbits authored
    … text and text -> html conversions a little more abstracted
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2302 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  2. @sorbits

    • call stringByStandardizingPath after creating the file, since that …

    sorbits authored
    …function only remove /private from the path for existing files
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2301 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  3. @sorbits

    • remove my user specific settings

    sorbits authored
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2300 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  4. @sorbits

    This is an input manager which is supposed to replace the Edit in Tex…

    sorbits authored
    …tMate service (when it's had a bit more polish and has been tested).
    
    It has a few advantages:
     o doesn't block the calling application
     o does html -> text and text -> html conversion for Mail (which edits text via an WebHTMLView, which is a little messy)
     o gives as filename the window title + calling application as extension (so one can bind languages based on application name)
     o can be called without having to first make a selection
     o even works from within TextMate (e.g. bundle editor), although not before next build (save/close will deadlock in current public build)
     o the activation key doesn't need to be command + something
    
    It is of course a hack. It adds an editInTextMate: action method to NSTextView and WebKit. To install build the target, then:
    
       mkdir -p ~/Library/InputManagers/Edit\ in\ TextMate
       cd ~/Library/InputManagers/Edit\ in\ TextMate
       ln -s "/path/to/Edit in TextMate.bundle" "Edit in TextMate.bundle"
       ln -s "/path/to/source/Info" Info
    
    In addition you'll need to add an entry in your key bindings file (~/Library/KeyBindings/DefaultKeyBinding.dict), I have this:
    
       "^E" = "editInTextMate:";
    
    If all this sounds complicated, just hold off using it till it gets bundled with TM.
    
    Currently it doesn't correctly “escape” tab characters when sending back text to Mail. The way it retains the calling view, and checks [view window] is also a little dirty, but it seems to work (and so it ought to).
    
    
    git-svn-id: http://svn.textmate.org/trunk/Tools/Edit%20in%20TextMate@2299 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
Something went wrong with that request. Please try again.