From joe@joemaller.com Sat Jun 10 03:53:09 2006 From: Joe Maller To: textmate@lists.macromates.com Subject: [TxMt] modifying Wrap Selection as Link Date: Fri, 09 Jun 2006 23:52:58 -0400 Message-ID: <4284FD60-FFA4-42CD-A3B4-0F7F1E3D3703@joemaller.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8353257404948272300==" --===============8353257404948272300== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit When invoked without a selection, the HTML Wrap Selection as Link snippet doesn't select the placeholder display text. Adding a second tab stop to the command could select the placeholder display text but would add an extra tab for those accustomed to using the snippet with a selection. Two questions: 1. is this a worthwhile change (or am I just looking for problems where none really exist)? 2. Is there a way to make the second tab-stop conditional on whether any text was selected? Possible modification (added tab stop to the last line): ${2:${TM_SELECTED_TEXT:Link text...}} The current last line is: `}">${TM_SELECTED_TEXT:Link text...} --===============8353257404948272300==-- From throw-away-1@macromates.com Sun Jun 11 10:22:23 2006 From: Allan Odgaard To: textmate@lists.macromates.com Subject: Re: [TxMt] modifying Wrap Selection as Link Date: Sun, 11 Jun 2006 12:22:08 +0200 Message-ID: <136CC3B0-DDDD-42EC-8620-F401F3B584CB@macromates.com> In-Reply-To: <4284FD60-FFA4-42CD-A3B4-0F7F1E3D3703@joemaller.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7773197631557809434==" --===============7773197631557809434== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 10/6/2006, at 5:52, Joe Maller wrote: > When invoked without a selection, the HTML Wrap Selection as Link > snippet doesn't select the placeholder display text [...] is this a > worthwhile change No, wrapping implies wrapping something. > 2. Is there a way to make the second tab-stop conditional on > whether any text was selected? Only by changing the snippet to a command which then has Insert as Snippet as output option. This command could then test if there is a selection. --===============7773197631557809434==-- From andreaswahlin@bredband.net Tue Jun 13 07:29:32 2006 From: Andreas Wahlin To: textmate@lists.macromates.com Subject: Re: [TxMt] modifying Wrap Selection as Link Date: Tue, 13 Jun 2006 09:29:22 +0200 Message-ID: <8CCEE980-12D2-49A7-9B3A-1DD3A7863EDA@bredband.net> In-Reply-To: <136CC3B0-DDDD-42EC-8620-F401F3B584CB@macromates.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7031126121918185200==" --===============7031126121918185200== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Opinion: Even though this does conflict with the name as such, I much prefer the functionality. I also changed the wrap seletion in open/close tag to match the behaviour. Andreas On Jun 11, 2006, at 12:22 , Allan Odgaard wrote: > On 10/6/2006, at 5:52, Joe Maller wrote: > >> When invoked without a selection, the HTML Wrap Selection as Link >> snippet doesn't select the placeholder display text [...] is this >> a worthwhile change > > No, wrapping implies wrapping something. --===============7031126121918185200==--