[TxMt] HTML: lookup element-reference on de.selfhtml.org
Allan Odgaard
throw-away-1 at macromates.com
Wed Mar 22 15:19:04 UTC 2006
On 22/3/2006, at 15:50, Niko Dittmann wrote:
> $tidy_html = `echo '#{$html}' | ${TM_TIDY:-tidy} -f /dev/null -i -
> ascii -asxhtml -wrap 0`
> puts $tidy_html
In that case, you could also call iconv -f iso-8859-1 -t utf-8
But you could also do something like:
puts "<meta http-equiv='Refresh' content='0;URL=#{url}'>"
That should then also save you the trouble of rewriting the relative
URLs.
> onother refinement: i recorded a macro that does a backward-search
> for "<", moves the caret 2 bytes to the right and then calls the
> command. this way you don't have to have the cursor on the html-
> element. enjoy!
You can also read TM_CURRENT_LINE and TM_LINE_INDEX for the carets
position and search back for the tag in code.
More information about the textmate
mailing list