I discovered the blogging bundle and I think is great, so I created a blog for the first time in my life. http://petitesnouvelles.wordpress.com/ http://petitesnouvelles.wordpress.com/ Well if I can't write with textmate it means that I can't write in a certain way :D
Now the problem is that if I paste code I need to use the <pre> (or the equivalent in markup or textile) tag which keeps the indentation but hides part of the code if I enlarge the font on my browser.
I could also limit the lenght of the strings but it does not solve completely the problem... It would be also nice some sintax highlighting and better formatting, any advices?
So how could I do?? Is it also possible to attach automatically binary and text files directly from textmate or not? (didn't see that function).
Thanks a lot
On 4 Dec 2008, at 18:36, Andrea Crotti wrote:
I discovered the blogging bundle [...] I paste code I need to use the <pre> (or the equivalent in markup or textile) tag which keeps the indentation but hides part of the code if I enlarge the font on my browser.
I could also limit the lenght of the strings but it does not solve completely the problem...
Put this in the CSS to get a scrollbar on demand: pre { overflow: auto; }
It would be also nice some sintax highlighting and better formatting, any advices?
You can use Bundles → TextMate → Paste Document / Selection Online…
This pastes to pastie and there is instructions on how to embed the pastie in your blog posts (pastie does a very nice presentation of the source and it is based on how TextMate parses it, so you can paste subsets of code / data formats and still get proper highlight, it even strips leading indent).
[...] Is it also possible to attach automatically binary and text files directly from textmate or not? (didn't see that function).
You can drag images to your blog post, this uploads them on the server and inserts a link in the document. Nothing is added for binary or text, but could be done by modifying the image drag command.
Allan Odgaard-4 wrote:
On 4 Dec 2008, at 18:36, Andrea Crotti wrote:
I discovered the blogging bundle [...] I paste code I need to use the <pre> (or the equivalent in markup or textile) tag which keeps the indentation but hides part of the code if I enlarge the font on my browser.
I could also limit the lenght of the strings but it does not solve completely the problem...
Put this in the CSS to get a scrollbar on demand: pre { overflow: auto; }
It would be also nice some sintax highlighting and better formatting, any advices?
You can use Bundles → TextMate → Paste Document / Selection Online…
This pastes to pastie and there is instructions on how to embed the pastie in your blog posts (pastie does a very nice presentation of the source and it is based on how TextMate parses it, so you can paste subsets of code / data formats and still get proper highlight, it even strips leading indent).
I'm trying to use pastie but I'm missing something, I paste the code, I copy-paste the <script> tag and I blog it.
Then my <script> dskfjsljk </script> just disappear, it's not accepted (but it doesn't give errors). What does it mean? Maybe I'm not allowed to put a link to a javascript maybe?
Just doing this is not correct <script src='http://pastie.org/333083.js'></script> THanks a lot
I found from http://support.wordpress.com/code/ here that there is the sourcecode directive for me, but not all languages I need are supported. Here they are:
cpp csharp css delphi html java jscript php python ruby sql vb xml
It doesn't even give me a "plain" (with no hightlighting) language which I could use, so I found http://pygments.org/ pygments It's really nice and I was trying to make it works somehow for the languages I'm not having, for example
# just to remind you of some useful environment variables # see Help / Environment Variables for the full list
LANGUAGE=$(echo ${TM_SCOPE#*.}) echo $TM_SELECTED_TEXT | pygmentize -l $LANGUAGE -f html | pbcopy
I get the extension, then I need to get my language from it, (py -> python, hs -> haskell etc), and I can pygmantize. The only problem is that it just generates html which depends on same css, as long as I can not edit the master css I have to paste it every time automatically inside the html. Now things get a little bit complicated, but it might work as I wanted finally, what do you think?
On 29 Dec 2008, at 23:20, Andrea Crotti wrote:
[...] Now things get a little bit complicated, but it might work as I wanted finally, what do you think?
There is also: http://code.google.com/p/syntaxhighlighter/
This is a syntax highlighter written in JavaScript, so the page source is “clean” (just the raw source code in a pre with the type stated as a class attribute).
Allan Odgaard-4 wrote:
On 29 Dec 2008, at 23:20, Andrea Crotti wrote:
[...] Now things get a little bit complicated, but it might work as I wanted finally, what do you think?
There is also: http://code.google.com/p/syntaxhighlighter/
This is a syntax highlighter written in JavaScript, so the page source is “clean” (just the raw source code in a pre with the type stated as a class attribute).
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Yes the wordpress tag is based on that, but I canno't insert javascript in my code... I then noticed that textmate itself can genereates web page and really nice css, why were you shy to notice it to me??
Anyway I will use the [sourcecode] tag and maybe textmate itself for the other languages, thanks