[TxMt] Re: Reformat text paragraph and time-stamping snippets
bibiko at eva.mpg.de
Mon Aug 25 23:03:54 UTC 2008
On 25.08.2008, at 23:47, Ahmed III wrote:
> 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.
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)
> 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?
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'
> 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.
Look at the attachment in:
More information about the textmate