Specify a key equivalent such as ⌘-T (Command-T) and you're off to the races. VpURL = _vpURLTemplate.format(vpMarkup=escape(vpMarkup), vpPageName=escape(vpPageName)) _tmURLTemplate = "txmt://open?url=file://" # What Textmate location are we bookmarking? You can use it by opening TextMate's Bundle Editor ( Bundles -> Bundle Editor -> Show Bundle Editor), creating a New Command using the tool menu at the bottom left of the Bundle Editor window, and pasting it into the resulting Command(s) text area: #!/usr/bin/env python2.6 Here's a Python script which implements this "Bookmark in VoodooPad" capability in TextMate. But this is a handy way to leave a trail of breadcrumbs while you're trying to decipher a new body of code. Granted, you're probably going to edit that code someday and then your bookmarks will break. TextMate will open the document and jump to the line of code referenced by the hyperlink. Later, when you want to get back to that chunk of code, just click on the hyperlink in VoodooPad. A hyperlink pointing to the selected code is inserted into your VoodooPad document.Select some code of interest in TextMate A hyperlink pointing to the selected code is inserted into your VoodooPad document Later, when you want to get back to that chunk of code, just click on the hyperlink in VoodooPad.Put these all together and what do you get? ![]() TextMate lets you define custom commands and trigger them with keyboard shortcuts that you specify. Open one of these URLs and TextMate will open a window showing the specified line (and column, if specified) of the specified file. TextMate URLs of the form txmt://open?url=file:// pathname&line= lineNum column= colNum.They let you inject HTML content - including hyperlinks - into an open VoodooPad document. Until now I've just jotted down pathnames and line numbers in my worklog, so I could manually retrace my steps. It's hard to keep track of where I've been, so I can back out of a code path once I understand what it does. When I'm trying to understand a new chunk of code, I often need to jump around through the code base. I do most of my code editing in TextMate. ![]() ![]() VoodooPad's new HTML-savvy application-specific URLs are a great way to retrace your steps in TextMate.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |