I tried the toggle between single and multline block with the following block:
domains.each do |d|
f[1].sub!(/^#{d[0]}$/, d[1])
end
It converted it into a single line block just fine, but when I toggled
it back to multiline I got this:
domains.each do |d|
f[1].sub!(/^#{d[0]
end$/, d[1]) }
Haven't yet examined the bundle regex but figured I'd post it in case
someone wanted to know.
Thanks,
Carl
I'm trying to maximize my use of textmate. One of the first things
I'm doing is looking through the ruby bundle to see what snippets I
can use. I first noticed the hash key/val snippet, which starts with
a colon.
The first thing it does is highlight the key so that I can type in a new key.
The next thing it does is highlight the sample string so that I can
type in something different. However, I'm having trouble typing
something in at this point. If I want to edit the string inside, is
there a key I can type that will put the caret inside the quotes? If
want to edit the string contents, I have to move my cursor over then
back. If I start typing, it erases the quotes. If I type quotes, it
surrounds the quotes in another set of quotes. Is this behavior there
because the snippet writer assumed I would not always want to put
strings in the hash buckets? This is understandable, but as a
shortcut for creating symbol/string combinations it is actually quite
tedious.
I figured maybe I was missing some secret keyboard shortcut that would
put me inside a fresh set of empty quotes instead of the sample that
is highlighted.
Thanks,
Carl
I'm using the run script command in the ruby bundle. Is there a way
that I can tell it what to pass as the command line parameters? It
seems to be passing in the filename of the script to itself.
Thanks,
Carl
What's the best way you've found to open some remote folders/files in TextMate?
* the files are kept remotely on a Linux box
* there is SSH (and presumably SFTP) access; I'm not sure if there's
Samba access enabled
* I want to be able to use the built in Subversion tools
* I absolutely want to use the various "project" features of TextMate
that I'd get if I open a folder with TextMate
I briefly tried using Cyberduck, but that would only let me open
individual files (rather than whole folders).
Any suggestions?
-d
Has anyone experienced this. Im running Textmate 1.5 (v906) with rev
2643 checkout of bundles. Tidy used to work fine but I now get:
-e:5: undefined method `match' for #<String:0xc5dd0> (NameError)
when I use it. Anyone got any ideas?
TIA
Stephen
> I put together and polished some commands Allan made in order to get
> the TextMate Documentation under way. As I worked on a documentation
> project at the same time, I used his scripts, bundled them and
> adapted them a little to my needs. If you are curious as to what
> happens behind the scenes… Here it goes.
Great work!! +5 :D
___________________
Ben Jackson
Diretor de Desenvolvimento
+55 (21) 2256-1022
ben(a)incomumdesign.com
http://www.incomumdesign.com
Hi all,
Is there a way to select some text in TextMate with the mouse, then
drag it to another application? What I'm trying to do is grab some
text out of TextMate and create a note in Yojimbo by dragging it to a
folder in Yojimbo's Drop Dock. I'm trying not to copy/switch app/
create note/paste.
Is there any way of doing this? I hope I'm not missing something
obvious.
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
Good Morning :)
I put together and polished some commands Allan made in order to get
the TextMate Documentation under way. As I worked on a documentation
project at the same time, I used his scripts, bundled them and
adapted them a little to my needs. If you are curious as to what
happens behind the scenes… Here it goes.
This bundle is for compiling a Documentation project made of several
Markdown files to HTML. It generates a TOC, a print version with all
chapters on one page and HTML files for each chapter. You can use
references to easily link between your pages.
I appended the bundle “Markdown2Book” plus, as an example how to use
it, the first three chapters of the TextMate manual.
Have fun,
Soryu.
PS: For quick reference the Help file from the bundle (also available
from the bundle itself via the “Readme” command):
# Setup
You will need a TextMate Project (a Scratch Project will do) to make
this work.
## Structure
The following files & folders are needed:
* `pages`
This is where all your markdown files go. You need to make a new
file for each chapter. It should have one first level heading which
will be used for the name of the chapter (in the Table of Contents,
for the Navigational Links & in the HTML title).
The files in the `pages` directory are converted to HTML (using
Markdown and SmartyPants) with the _Generate_ Command. They have to
be in the right order, so they have to be named beginning with
numbers followed by a space or an underscore (as seen in the included
example). This prefix will be stripped by the Generate Script.
* `html`
The generated files will go here.
* `index.html`: Table of Contents from which you can navigate to
all chapter.
* `all_pages.html`: A single files with all chapters. This is
mainly for printing and it uses the `print.css` Stylesheet.
* `*.html`: Every chapter has it's own file.
Also this folder holds two links to the css and images folder.
When "deploying" your compiled book, just replace these by the actual
folders.
* `templates`
This folder contains three html templates. Adapt them to your
needs.
* `all.rhtml`: template for the `all_pages.html` file which
contains all your chapters.
* `chapter.html`: template for each chapter
* `toc.html`: template for the `index.html` file containing the
Table of Contents
* `css`
This folder contains the stylesheets (`stylesheet.css` and
`print.css`). Adapt those as you like. The default style resembles
the [TextMate Manual](http://macromates.com/textmate/manual/).
* `images`
This folder should hold all your images. When the book is
generated `height` and `width` HTML attributes are added to the
images. The source path could be changed, too, to make it absolute.
## References
You can use reference style links (`[link description][link id]`) in
your text. There is a command _Update References_ that will collect
them from all `.markdown` files in the `pages` folder and write them
to a file `markdown.references` in the project root. It notifies you
of missing or duplicate entries via a Tooltip. You can then edit this
file and insert the link targets within your text. The _Generate_
Script will add `id` attributes to your headings, so you can
reference them directly. Is converts some characters (`- \/_`) to
underscores and strips non-alphanumeric characters afterwards.
I wrote a command _Show References_ that brings up a dialog with all
the references from the `markdown.references` file and inserts a
reference snippet.
## Generation process
The _Generate_ Command is a Ruby Script, which does some
transformation, constructs the Table of Contents and runs all your
Markdown files through [Markdown](http://daringfireball.net/projects/
markdown/), [SmartyPants](http://daringfireball.net/projects/
smartypants/) (for good Typography) and the Image-Script.
<hr />
> Credits to Allan for writing the initial version of all this. I,
Soryu, bundled it up in a TextMate bundle and added/polished some stuff.