I apologize for being off-topic, but I think there's more expertise on
this list than I'll find elsewhere.
I'm thinking about moving my blog from Movable Type 3.2 to WordPress.
As a test, I've set up a local WP installation and imported my old
posts--all of which are written in Markdown. They look awful,
primarily because the blocks of source code in many of my posts are
not being imported properly. Here is what I've done:
1. Exported the MT 3.2 posts using MT's builtin export command.
2. Installed WP and the PHP-MarkdownExtra plugin. Activated the plugin.
3. Imported into WP the text file that came out of the MT export process.
The biggest problem seems to be that WP isn't recognizing the Markdown
formatting of the exported posts. What should be enclosed by
<pre><code>...</code></pre> are enclosed by simple paragraph tags
instead.
Has anyone here experienced and solved this problem?
--
Dr. Drang
Hi!
In XML bundle, the block doesn't fold properly
if the closing tag is not on a separate line.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<document>
<page>This tag block doesn't fold properly.
It folds as if '/document' tag closes it.
The closing tag is on the same line.</page>
<page>This tag block folds properly.
The closing tag is on a separate line.
</page>
</document>
Cheers,
Sergei Yakovlev
Hi!
A well-known problem with Move Selection Line Up/Down commands
(Control-Command-Up/Down) is
that if you use them without selection (which means "move current
line"), the cursor ends
up in the wrong place. This has been bugging me and my friends for
quite some time, so I
wrote a fix. It's two macros overriding default key equivalents,
which you can find
attached to the bug description at http://macromates.com/ticket/show?
ticket_id=58C52785 .
Please tell if this works for you.
Also, is it possible to put this fix into some standard TextMate
bundle like Text.tmbundle,
so that all TextMate users enjoy it? (Until it is fixed in the new
engine of TextMate 2.)
What is the best way to do it?
This is my first experience in TextMate programming, and several
times I've been stuck in
various dead-ends. What follows is a somewhat long description of how
I approached the
problem along with some suggestions on making TextMate easier to
program. Most people would
like to skip this.
So, my first (rather silly) attempt was a huge Ruby program which
replicated functionality
of Move Selection Line Up/Down and depended on my assumption that the
cursor is always at
the end of selection (potentially allowing me to calculate all the
necessary offsets in the
file). Well, it turned out that my assumption was simply not true, as
the cursor can be
anywhere inside the selection, depending on how you've selected the
text.
Suggestion 1. It would be useful if TextMate had variables like
$TM_SELECTION_START and
$TM_SELECTION_END which would return the corresponding offsets in
the file (or the
cursor offset, if nothing is selected).
On a second attempt, I decided that I should instead go with the
built-in commands, simply
correcting the cursor position for the special case when nothing is
selected. So we
remember current cursor position, call Move Selection Line Up/Down,
and move the cursor
back to remembered position if nothing is selected. There are two
problems here. First, you
can only call built-in commands from macros, and it is not possible
to remember values
through the steps of a macro. Second, there is no direct way to
reposition the cursor. One
indirect way to achieve this is to insert a snippet with a $0
variable. However, to move
the cursor to arbitrary position in this fashion, we need an output
option like "Replace
Document as Snippet", which is not available. Because of these two
problems, I decided to
use TMTOOLS plugin, which has "call macro" (for calling arbitrary
macros and built-in
commands from commands) and "set caretTo" (for setting the cursor
position). I got a
working solution, but it had a delay of 0.5 to 1 s, which was too
slow to be useful.
Suggestion 2. Add a way to set "global" environment variables
programmatically (from
commands). These "global" variables should be available to all
subsequently called
commands (and other bundle items) until explicitly unset.
Suggestion 3. Replace output options "Insert as Text" and
"Insert as Snippet" with just
one option, "Insert", and add a checkbox "as Snippet" to the
right. This would add such
useful options as "Replace Selected Text as Snippet", "Replace
Document as Snippet" and
"Create New Document as Snippet" without making the list of
options too long.
So, on a third (and final) attempt, I dropped TMTOOLS and returned to
the idea of a macro.
Inspired by Duane Johnson's solution for multiple insertion points, I
decided to use a
special symbol (mark) to "remember" the initial position of the
cursor. So we insert the
mark at the cursor (if nothing is selected), call Move Selection Line
Up/Down, and replace
the mark with empty string (if nothing is selected), which moves the
cursor there as a
side-effect. The problem here is that Replace command always replaces
current selection
with replace buffer, even if it doesn't match the find buffer, which
ruins the case when
something has already been selected in the beginning. Replace All
also ruins current
selection, moving the cursor to the beginning of the file even if it
has not found any
matches. Fortunately, the Find Next/Previous command will only change
current selection if
the match has been found. So that's what we use. If there is a mark
in the text, it will
get selected, otherwise, the selection won't change. Finally, the
selection is replaced
with an empty string if what's selected is a mark. The wrong cursor
position after Move
Selection Line Up/Down is always further in text than the right
position (actually, it's on
the next line), so we use Find Previous command to perform the
search. Because of this
little detail, the solution is actually pretty fast.
Suggestion 4. Replace All should not alter current selection if
no matches are found.
The only remaining question is what symbol to use as a mark. I
decided to use √ (221A,
SQUARE ROOT character, which you can type with Option-V), but I'm not
sure this is the best
choice. Maybe it's better to use some character from Private Use Area
(E000--F8FF)?
Best regards,
Sergei Yakovlev
This is a strange one. The other day my Subversion commits have
suddenly stopped working in terms of uploading to the repository.
I ctrl-shift-A, use the commit and get the window for commiting the
files I've highlighted and the -m message window. Enter a message...
All good.
When I hit Commit however, I get the Subversion Commit -
"Transmitting File data" window and the barber pole but the window
never comes back with either a dialogue box for the password for the
user or anything at all. I end up having to quite Textmate in order
to kill it and then doing a command line svn cleanup on the files
that I was trying to upload.
Handling svn through the command line with svn ci file.rhtml -m "blah
de blah" works fine however.
Does anyone have any idea of what may be causing this and how to
correct it ? I've gotten so used to the svn budle it's really
cramping my style now...
thanks !
Daryl.
PS> OSX 10.4.11, Textmate Version 1.5.7 (1436), svn, version 1.4.5
(r25188)
Hi,
I've been trying to make a TM command to convert text encodings (with
a nice little tm_dialog that took a while to figure out but now works
very well).
But for some reason, it won't read the file correctly using stdin.
So that this works:
iconv -f $ENC -t UTF8 "$TM_FILEPATH"
But this does not (nor do other variations on the theme using stdin):
iconv -f $ENC -t UTF8 < /dev/stdin
TM seems to do something to the text to change its encoding, so that
iconv cannot convert properly.
Even stranger than that, some encodings trigger this error:
/usr/bin/iconv: conversion from "SHIFT_JISX0213" unsupported
/usr/bin/iconv: try '/usr/bin/iconv -l' to get the list of supported
encodings
Does anyone have an idea about what's going on here?
Thanks,
Alex
I'm wondering if the contents of my "/Library/Application
Support/Textmate" directory is correct after checkout from svn.
Should it be this:
Bundles/
Support/
or this:
Bundles/
Conventions.txt
Disabled Bundles/
LICENSE
Manual/
PlugIns/
README
Review/
Support/
Themes/
Tools/
Work in Progress/
Perhaps I invoked a checkout on the wrong directory?
Ultimately I am trying to see all the Bundles in the Bundle directory.
I'm unable to find ODCompletion items even though I see them in the
file system.
Thank you!
az
When working with a Latex project, is there a way to specify the
bibliography file that should be used by the relevant commands?
I'm sorry is this question has an obvious answer, but I can't seem to find
it...
Best wishes,
NPC
I updated the MultiMarkdown TextMate bundle today. This update fixes
a problem that Leopard users were having --- or at least I think it
does. It still works for me in Tiger, and I hear reports that this
fixes the problem Leopard users were having. Specifically, they were
getting an error message like:
/bin/bash: line 2: cd: ~/Library/Application\ Support/MultiMarkdown:
No such file or directory
/bin/bash: line 3: cd: bin: No such file or directory
/bin/bash: line 5: ./multimarkdown2XHTML.pl: No such file or directory
This was caused by an apparent change in the way the shell works
under Leopard. Please let me know if you continue to have trouble
with this, and thanks to everyone who helped track down this bug.
Download the new version from:
* <http://files.fletcherpenney.net/MultiMarkdownForTextMate.zip>
--
Fletcher T. Penney
fletcher(a)fletcherpenney.net
If you start out depressed, everything's kind of a pleasant surprise.
- Lloyd (John Cusack) in Say Anything
Hi,
While watching the 2nd obj-C screencast, I noticed Allan was getting a
tab-completion on the word NSArray. Is it possible that particular
tab-completion was removed from Textmate since the screencast was
created? Or might I not have all the obj-C bundles?
FTR... I get a rewrite/insertion of this:
NSMutableArray *array = [NSMutableArray array];
when I do a tab completion on the word:
array
Perhaps creating such a tab-completion is so simple I can create my own?
Do some bundles exist which are not distributed via the textmate svn repository?
Thanks...
az
Allan Odgaard wrote:
> On 20 Dec 2007, at 20:47, Alan Curtis wrote:
>
> > cd "${TM_MULTIMARKDOWN_PATH:-~/Library/Application Support/
> > MultiMarkdown}"
>
> I think this (default path) lack “.tmbundle” and it _really_ should be
> using TM_SUPPORT_PATH instead of a hardcoded (default) path, which
> additionally means it should store multimarkdown2XHTML.pl under
> Support/bin (in the bundle).
No - MultiMarkdown belongs in Application Support - not in the
textmate bundle. If it's in the bundle, then it's not accessible to
other programs that use MultiMarkdown.
The problem here appears to be that Leopard changes the way the shell
and the TextMate variables work. I have not upgraded to Leopard yet,
and welcome suggestions on how to fix the problem that Leopard users
are having.
F-
--
Fletcher T. Penney
fletcher(a)fletcherpenney.net
If you start out depressed, everything's kind of a pleasant surprise.
- Lloyd (John Cusack) in Say Anything