How can I get a link to be clickable in PlainText in Textmate. Currently it gets underlined, but is not clickable.
-
So you can create the link but it will not do the desired behaviour? – ricbax Dec 05 '09 at 13:53
-
If I type http://b.com it is a link, but there is no way to navigate to it. I wish to navigate to it from Textmate. – Dan Rosenstark Dec 07 '09 at 12:10
2 Answers
Position cursor on url and press return (not enter on mac book it is fn + enter). This will work only on links that are detected ant therefore highlighted (like http://b.com, it won't work for simple b.com)
- 4,624
- 4
- 34
- 49
-
1
-
1
-
It's actually bound to enter ( fn-↩ on keyboards with no dedicated enter key). urls are handled by an injection grammar from hyperlink helper. – tim Mar 26 '13 at 23:21
-
1This is the most counter-intuitive thing ever. I always have to Google the answer. Glad it is easy to find though. – Noldorin May 31 '21 at 00:27
The following answer relies on OS X 10.6 and its new and improved Services feature.
To open URLs from TextMate all you need is a couple keyboard shortcuts. If your cursor is anywhere within the URL or at the beginning (not at the end), you can select the whole URL by going to Edit -> Select -> Current Scope or using the keyboard shortcut ⌃⌥B. Then, in the TextMate -> Services menu, click Open URL in the Internet section. You can set a global keyboard shortcut for this by going to the Services Preference Pane and typing in a shortcut for the Open URL service. I use ⌃⌘L.
Therefore, to very quickly open a URL from TextMate, place your cursor in the URL, type ⌃⌥B and ⌃⌘L. That might even be faster than clicking it if it were clickable.
- 14,636
- 2
- 35
- 44
-
Thanks Fideli, when I get 10.6 up and running (tempted to try today, so if I never come back it means my computer caught fire) I'll give this a shot and mark it best answer if it works. – Dan Rosenstark Dec 15 '09 at 14:32
-
-
1