Hey guys,
I am new to TextMate. I love this application, but some things I miss.
1. How do I reformat a text paragraph to be within a set width, like 80? On TextPad, on Windows, you could do that easily by setting the default text width to 80, and reformatting the paragraph. I can't find a similar 'text width' setting in TextMate. Where is it hidden? Does someone have a command to do this? I can write my own, just show me a similar example.
2. I have a single file of dairy-like entries. Before I start writing, I want to timestamp each entry. I am looking to insert the following snippet:
"========== YYYY-MM-DD HH-MM-SS
" How do I do that?
I am aware of the timestamp command in the Text bundle but that only inserts the calendar date, not the time, and I don't know how to add the horizontal break before it.
3. I must say whereas the manual is very easy to read. I find it hard to find out how to quickly implement what I need.
Thank you all. I am trying to figure out how to do things the textmate way. Apologies if I am clogging your mailbox
Ahmed
On 25.08.2008, at 23:47, Ahmed III wrote:
- How do I reformat a text paragraph to be within a set width, like
80? On TextPad, on Windows, you could do that easily by setting the default text width to 80, and reformatting the paragraph. I can't find a similar 'text width' setting in TextMate. Where is it hidden? Does someone have a command to do this? I can write my own, just show me a similar example.
Try this: -Go to: View > Wrap Columns -set it to whatever -press APPLE+a (select all) -press CTRL+q (reformat selection)
There's also the bash command 'fmt' and/or 'fold' in conjuction with $TM_COLUMN etc. for scripting. see 'man fmt' or 'man fold'. (Maybe use my hint for 3.) for more)
- I have a single file of dairy-like entries. Before I start
writing, I want to timestamp each entry. I am looking to insert the following snippet:
"========== YYYY-MM-DD HH-MM-SS
" How do I do that?
Type in an empty line: date "+==========%n%Y-%m-%d %H:%M:%S%n%n%n"
and press CTRL+OPT+r (Execute Line and Replace With Result) or write a tiny tmCommand/macro/snippet for it. see more 'man date'
- I must say whereas the manual is very easy to read. I find it hard
to find out how to quickly implement what I need.
Look at the attachment in: http://www.nabble.com/Ask-the-TextMate-List-%E2%80%93-a-suggestion- to19071954.html#a19138720
Cheers,
--Hans
On Aug 25, 2008, at 7:03 PM, Hans-Jörg Bibiko wrote:
Try this: -Go to: View > Wrap Columns -set it to whatever -press APPLE+a (select all) -press CTRL+q (reformat selection)
...and then revert the wrap setting, and if you want to wrap again, you have to set it again, then revert it again, etc. There really ought to be a better way, like this:
http://lists.macromates.com/textmate/2006-November/015684.html
Trevor
On 26.08.2008, at 15:01, Trevor Harmon wrote:
On Aug 25, 2008, at 7:03 PM, Hans-Jörg Bibiko wrote:
Try this: -Go to: View > Wrap Columns -set it to whatever -press APPLE+a (select all) -press CTRL+q (reformat selection)
...and then revert the wrap setting, and if you want to wrap again, you have to set it again, then revert it again, etc. There really ought to be a better way, like this:
http://lists.macromates.com/textmate/2006-November/015684.html
Or try my personal approach: http://www.nabble.com/LaTeX%3A-Wrapping-once-more-and-Extended-Set-of-Citati...
I have set Soft Wrap. Then I resize the window to my needs and invoke one of the two mentioned tmCommands.
--Hans
Hi,
On Aug 25, 2008, at 10:47 PM, Ahmed III wrote:
- How do I reformat a text paragraph to be within a set width, like
80? On TextPad, on Windows, you could do that easily by setting the default text width to 80, and reformatting the paragraph. I can't find a similar 'text width' setting in TextMate. Where is it hidden? Does someone have a command to do this? I can write my own, just show me a similar example.
I use an external command with the Text::AutoFormat perl module, but you can try the UNIX fmt command available on OS X.
Select the text you want to format, right-click, Filter Through Command, and try it.
- I have a single file of dairy-like entries. Before I start
writing, I want to timestamp each entry. I am looking to insert the following snippet:
"========== YYYY-MM-DD HH-MM-SS
" How do I do that?
Define the snippet with the text above. Replace your YYYY... time stamp with $(`date '+%Y-%m-%d %H-%M-%S'`)
You can also place a $0 at the point where you want your cursor to end up.
When you create a new snippet, the text shown explains all these options, BTW.
I am aware of the timestamp command in the Text bundle but that only inserts the calendar date, not the time, and I don't know how to add the horizontal break before it.
The horizontal break is just plain text, you just type it.
- I must say whereas the manual is very easy to read. I find it hard
to find out how to quickly implement what I need.
I like the TextMate book,, it helps a lot.
Best regards,