Perhaps I'm doing this wrong, but I'm trying to figure out a way to do wrap text using the command-ctrl-shift-w shortcut while preserving my code formatting.
If i have this:
<ul> 1 2 3 4 </ul>
then select my prospective list items, command-ctrl-shfit-w, and i get this:
<ul> <li> 1</li> <li> 2</li> <li> 3</li> <li> 4</li> </ul>
but i'd really like this:
<ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul>
is this possible? is there any "special" way to select text so that i'm just selecting the items i want and not the formatted-related tabs or spaces? or is there yet a better way?
Have you tried column-selecting the list, so none of the whitespace before each number is in the selection?
Perhaps I'm doing this wrong, but I'm trying to figure out a way to do wrap text using the command-ctrl-shift-w shortcut while preserving my code formatting.
If i have this:
<ul> 1 2 3 4 </ul>
then select my prospective list items, command-ctrl-shfit-w, and i get this:
<ul> <li> 1</li> <li> 2</li> <li> 3</li> <li> 4</li> </ul>
but i'd really like this:
<ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul>
is this possible? is there any "special" way to select text so that i'm just selecting the items i want and not the formatted-related tabs or spaces? or is there yet a better way?
On 26/7/2006, at 18:27, Eric D. Fields wrote:
Perhaps I'm doing this wrong, but I'm trying to figure out a way to do wrap text using the command-ctrl-shift-w shortcut while preserving my code formatting. [...]
I have changed the command to the following, which makes it leave the indent to the left of the start tag:
perl -pe 's/[$`\]/\$&/g; s/([ \t]*)(.+)/$1<${1:li}>$2</${1 /\s.*//}>/'
This works great! Thanks Eric for the suggestion and thanks Allan for command.
Josh
On Jul 27, 2006, at 6:54 AM, Allan Odgaard wrote:
On 26/7/2006, at 18:27, Eric D. Fields wrote:
Perhaps I'm doing this wrong, but I'm trying to figure out a way to do wrap text using the command-ctrl-shift-w shortcut while preserving my code formatting. [...]
I have changed the command to the following, which makes it leave the indent to the left of the start tag:
perl -pe 's/[\$`\\]/\\$&/g; s/([ \t]*)(.+)/$1<\${1:li}>$2<\/\${1
/\s.*//}>/'
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate