Hi,
I'm using the latest version of TM with all the updates applied on Tiger
10.4 with all the latest updates.
This is a really minor thing but it would be nice to have fixed. I
suspect it's just a regex tweak that's needed.
If I write a method declaration in an interface:
public interface MyInterface {
public void somethingSpecial(Object foo,
Object bar) throws SomeException,
AnotherException;
public String getName();
}
Then it breaks the highlighting.
If I put it all on the one line then it works fine.
Cheers,
Chris
Hi!
Didn't use the blogging-bundle for a longer time and now I needed it
again and get the following when I tried to fetch a post from a long
time ago set up blog:
Received exception: wrong dateTime.iso8601 format
No posts available
Any ideas?
Niels
Guys, the file i linked is just a chapter... all the include,
documentclass etc are in the main file... just trust me the file is
regular latex, i can compile it even through textmate without any
warning/error... there is just a problem in coloring and i'd be happy
if someone, which know the latex bundle, can fix it.
btw, i've also an improvement request in the latex bundle... every
time i do typeset and view the pdf go to the beginning of the
document, which is very annoying, especially if you are reviewing a
document of many pages... TexShop for example keep the position in
the pdf viewer, letting you see the changes very fast.
> Da: Charilaos Skiadas <cskiadas(a)gmail.com>
> Data: 21 settembre 2007 12:10:48 GMT+02:00
> A: TextMate users <textmate(a)lists.macromates.com>
> Oggetto: Re: [TxMt] latex bundle - coloring error - \ and lstlisting
> Rispondi a: TextMate users <textmate(a)lists.macromates.com>
>
>
> Hi Luca,
>
> I cannot reproduce this, and downloading the file you put on the
> ticket did not help either. Perhaps you can send me the sample file
> over email? The version on the web looks really weird, no newlines
> etc.
>
> Btw, what is the scope on the lines both before and after your
> lstlisting? You can find that by placing the caret there and
> pressing ctrl-shift-p. Also what is the scope inside your lstlisting?
>
> On Sep 20, 2007, at 12:22 PM, Luca Torella wrote:
>
>> There is an error in the coloring of a latex document when i put a
>> '\' in a lstlisting; here is the example:
>>
>> \begin{lstlisting}
>> reservedWordsFM = listToUFM $
>> map (\(x, y, z) -> (mkFastString x, (y, z)))
>> \end{lstlisting}
>>
>> the '\' is legal in the lstlisting but the bundle show an invalid
>> string and invalidate all t he remaining document
>>
>> if u wanna see the file which introduce the error you can download
>> it here:
>> http://macromates.com/ticket/show?ticket_id=0A9B755F
>
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
>
>
>
>
>
>
>
>
> Da: "Robin Houston" <robin.houston(a)gmail.com>
> Data: 21 settembre 2007 12:18:47 GMT+02:00
> A: "TextMate users" <textmate(a)lists.macromates.com>
> Oggetto: Re: [TxMt] latex bundle - coloring error - \ and lstlisting
> Rispondi a: TextMate users <textmate(a)lists.macromates.com>
>
>
> On 21/09/2007, Charilaos Skiadas <cskiadas(a)gmail.com> wrote:
>> The version on the web looks really weird, no newlines etc.
>
> I think that's because your web browser is trying to interpret it
> as HTML.
> If you download it, it looks okay; though it's not a standalone
> document
> (it doesn't start with \documentclass, nor indicate which packages
> it uses.)
>
> Robin
There is an error in the coloring of a latex document when i put a
'\' in a lstlisting; here is the example:
\begin{lstlisting}
reservedWordsFM = listToUFM $
map (\(x, y, z) -> (mkFastString x, (y, z)))
\end{lstlisting}
the '\' is legal in the lstlisting but the bundle show an invalid
string and invalidate all t he remaining document
if u wanna see the file which introduce the error you can download it
here:
http://macromates.com/ticket/show?ticket_id=0A9B755F
hello
Ruben Debeerst suggests to change the "left...right" snippet which
wraps "(something)" into "\left(something\right)"
I think that is interesting but I would like to make this for ( and
[ but not for {
In this case, I would prefer
"{something}" into "\left\{something\right\}"
But I've a problem because actually I learn regex, ruby syntax
grammar etc....
I'm sure that's possible with a command and a script with ruby or
perl but is it possible only with regex in a snippet.
The proposition of Ruben is :
${TM_SELECTED_TEXT/(.*)(\\}|\)|\])/\\left$1\\right$2/}
If I make a special snippet for {
I have two snippets
for ( and [
${TM_SELECTED_TEXT/(.*)(\)|\])/\\left$1\\right$2/}
and for {
${TM_SELECTED_TEXT/(.*)(\})/\\left\\$1\\right\\$2/}
How to make this with only one snippet ?
Thanks
Regars Alain
I found it. The ruby call is directly in the command with slash bang.
Sorry for my earlier post. I'm new to TextMate and to the list.
BTW: Hi list!
---------------------------- Original Message ----------------------------
Subject: Re: [TxMt] Blogging bundle receives exception
From: "Ferhat Ayaz" <fa(a)kedisoft.com>
Date: Thu, September 20, 2007 12:39 pm
To: textmate(a)lists.macromates.com
--------------------------------------------------------------------------
Allan Odgaard-2 wrote:
>
>
> Alternatively you can upgrade to a newer Ruby, which is more lax in
> what date formats it accepts.
>
>
Hi,
I installed a newer ruby (1.8.6) under /opt/local/ (my rails environment).
How can I use this one instead
of /usr/local/bin/ruby with TextMate?
No, I don't want to add /opt/local/bin/ to my PATH.
Thanks,
Ferhat
--
View this message in context:
http://www.nabble.com/Blogging-bundle-receives-exception-tf4475902.html#a12…
Sent from the textmate users mailing list archive at Nabble.com.
______________________________________________________________________
For new threads USE THIS: textmate(a)lists.macromates.com
(threading gets destroyed and the universe will collapse if you don't)
http://lists.macromates.com/mailman/listinfo/textmate
hello
In the latex bundle we find:
A) a command (ctrl+shift+W)
#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH'] +'/lib/escape.rb'
print "\\\\${1:emph}{#{if s = ENV['TM_SELECTED_TEXT'] then e_sn(s)
else '$2' end}}"
B) an other command (cmd B)
toggle_style.rb -style=textbf
C) a snippet(ctrl+shift+E)
\\${1:text${2:bf}}{$TM_SELECTED_TEXT}
----------------------------------------------------
three questions :
1) Why this snippet ? (the commands are useful !)
2) the snippet appears in the Select Bundle Item of the menu Bundle
but not in the item Latex of the menu Bundle (perhaps i don't
see it).
3) \${1:text${2:bf}}{$TM_SELECTED_TEXT} i don't understand the syntax
why not :
\\${1:text}${2:bf}{$TM_SELECTED_TEXT} ?
we can change text with math and bf with cal for example
Regards Alain
So, a long while ago, I mentioned I was working on a Velocity bundle
for use with Textmate (and e, etc). We've been using a version of this
internally at work, and it served our purposes reasonably well.
Having read James Edward Gray's superb book, I decided to rewrite the
bundle from scratch. The initial language grammar was very much a
reverse-engineering job based on other grammars. This time around, I
started from scratch, and based my grammar on JEG's tips and on the
Velocity documentation (which served as a useful spec and test suite).
An initial public release of the bundle is available here:
http://code.google.com/p/txm-vtl-bundle/
and you can get the bundle itself thus:
svn checkout http://txm-vtl-bundle.googlecode.com/svn/trunk/
---
I'd be really interested in feedback, fixes, and patches. Do use the
GoogleCode issue tracker, and do submit diff files. I'm particularly
interested in more snippets - I've literally put in the basic stuff we
use (and nothing specific to our templating) - but am aware many
people use Velocity in different manners. Also, if anyone wants to
produce grammars for Velocity-XML (or whatever), based upon the
Velocity-HTML grammar, feel free.
Sorry it took so long to make public. I hope people find it useful,
and that we can improve it together - and at some point get it into
the official repository (if you're around, Allan...)
All the best,
t.
Hi,
Over the past years I wrote some very tiny code snippets in order to
save time while using TM. I copy&pasted it from one code to a new
command etc. Then I had the idea to put everything together in a
plugin to use my code snippets more flexible.
Ok, I did this. I took the idea of tm_dialog, Joachim Mårtensson's
completion menu, and me tiny code snippets. The result is the TMTOOLS
plugin.
usage:
"$TMTOOLS" -[fsgiem] -p PLIST
f --extended-popup
s --set
g --get
i --insert
e --execute
m --play macro
Each of the following commands can be used within any tmCommand/
script written in bash, ruby, perl, etc.
(tentative) LIST OF COMMANDS:
-----------------------------------------------
Show as completion menu:
-TM's internal word list completion
-Word completion with Cocoa's spellchecker dictionaries of different
languages
(TM's internal word completion list is added before the
spellchecker's list :)
-File/Path Completion
-Insert text
-Insert text as snippet
Set: (also as batch)
-set word characters
-place the caret to
-select something within the document
-set tab size
-set soft tabs
-set soft wrap
-set the language/grammar by its name
-set show line numbers
-set font size
-set font name
-set bookmarks for lines
-set userdefault for a key
-play a dynamic generated macro
Get:
-get the _current_ text from the document
-get the XML representation of the document
-get the XML representation of the selection
-get the position under the caret
-get all bookmarks out the current document
-get all symbols
-is document edited?
-get font size
-get font name
-get current stylesheet
-get all opened files in a project
-get the default for a key
-get the head of the current line according to the caret
-get the tail of the current line according to the caret
-get the head of the current word according to the caret
-get the tail of the current word according to the caret
Execute: (also as batch)
-reloadBundles
-select current scope
-run any macro, command, template, or snippet by its name
-open saveAs panel
-open open Panel
-open web preview
-open bundle editor
-open print panel
-center selection in window
-delete all bookmarks
-go to next/previous snippet field
-convert a text according to unicode's mapping [(de)compose]
and some more...
One can do very nice things with TMTOOLS.
E.g., by myself I'm using very often
-go to next snippet field and show suggestions according the selected
text, select a suggestion, and go to the next snippet field
(It was always annoying to see only 'NSStringEncoding'. Now, if the
snippet field is 'NSStringEncoding' it shows me 'NSUTF8Encoding,
NSASCIIStringEncoding, NSJapaneseEUCStringEncoding, ...'. Or if the
snippet field is something like uft8|ascii|utf16, it gives me these
items as inline menu. )
-create an HTML page out of my document, change the font size, and
open the web preview
-get all bookmarks, show a inline menu, and go to the selected bookmark
-open a text document *.txt, set my grammar to a language which
highlights consonat clusters, hide line numbers
-open a text document *_jp.txt, set the font name to ForMateKonaVe
and size to 14pt, to input Japanese
-the chance to execute dynamic generated macros - very helpful ;)
-if you have a long text you can set bookmarks to line
50,100,150,200,...
To illustrate the syntax of such commands here some examples:
play a macro:
"$TMTOOLS" -m -p '{
commands = (
{command = "moveWordRight:"; },
{command = "moveWordLeftAndModifySelection:"; },
{command = "moveWordLeftAndModifySelection:"; },
{command = "moveWordLeftAndModifySelection:"; }
);
}' $val
set a grammar:
"$TMTOOLS" --set -p '{grammar;to="Objective-C++";}'
set as batch:
"$TMTOOLS" -s -p '{
batch=(
{grammar;to=Perl;},
{wordchars;to="_$";}, <= this is very useful ;)
{caret;toLine=2;toColumn=2;},
{selection;toColumn=end;}
);
}'
execute as batch:
"$TMTOOLS" -e -p '{
batch=(
{command;name="Add Line Numbers to Document / Selection";},
{command;name="Duplicate Line / Selection";},
{macro;name="Move to EOL and Insert “.”";}
);
}'
go to next snippet field and show according to its selection a inline
menu with suggestions:
"$TMTOOLS" -e -p '{nextsnippetfield;}'
"$TMTOOLS" -e -p '{command;name="ShowAsList";}'
prepare a coloured print version of my document:
"$TMTOOLS" -e -p '{command;name="Create HTML From Document /
Selection";}'
"$TMTOOLS" -m -p '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>commands</key>
<array>
<dict>
<key>argument</key>
<dict>
<key>action</key>
<string>replaceAll</string>
<key>findInProjectIgnoreCase</key>
<false/>
<key>findString</key>
<string>font-size: .*?px</string>
<key>ignoreCase</key>
<true/>
<key>regularExpression</key>
<true/>
<key>replaceAllScope</key>
<string>document</string>
<key>replaceString</key>
<string>font-size: 8px</string>
<key>wrapAround</key>
<true/>
</dict>
<key>command</key>
<string>findWithOptions:</string>
</dict>
</array>
</dict>
</plist>
'
"$TMTOOLS" -e -p '{showwebpreview;}'
convert the unicode mapping of the entire document:
IN=$(cat)
PLIST="{convert;what=\"$IN\";using="nfd";}"
"$TMTOOLS" -g -p "$PLIST"
# allowed parameters for key 'using'
#
# nfd = decompose according to canonical mapping
# nfc = compose according to canonical mapping
# kd = decompose according to canonical compatibility mapping
# kc = compose according to canonical compatibility mapping
#
# see more at http://www.unicode.org/reports/tr15/
set the selection from the caret 4 chars back:
"$TMTOOLS" --set -p '{selection;length=-4;}'
one has the line "This is rub|bish and" [| = caret]:
"$TMTOOLS" -g -p '{wordaftercaret;}'
gives you "bish"
Up to now this plugin is more or less a collection. I have to fixed
some error handlings, unify the output, etc.
So, my question whether it would be worth to clean the code and
publish it. In other words: Is someone interested in such a plugin?
One has to mention that TMTOOLS depends on Allan's code. If he
changes the code maybe one has to adjust TMTOOLS' code as well. Then
Allan plans to include some of these commands in TM2.
Any feedback?
Cheers,
Hans
> On 9/18/07, Jacob Rus <jacobolus(a)gmail.com> wrote:
>
>>
>> I'm planning to someday turn my right ⌘ key into an ⎋ key.
>> I've been
>> too lazy so far to figure out how though.
>>
>>
>
>
> Check Ukelele[1], it probably does that without too much hassle...
>
> [1]: <http://scripts.sil.org/cms/scripts/page.php?
> site_id=nrsi&item_id=ukelele>
Has anyone managed to make this swap with Ukelele? An obstruction I
found is that left ⌘ and right ⌘ are linked together.
Jenny