El 23/04/2007, a las 14:00, textmate-request(a)lists.macromates.com
escribió:
> De: Allan Odgaard <throw-away-1(a)macromates.com>
> Fecha: 23 de abril de 2007 03:03:18 GMT+02:00
> Para: TextMate users <textmate(a)lists.macromates.com>
> Asunto: Re: [TxMt] QuickOpen included files
> Responder a: TextMate users <textmate(a)lists.macromates.com>
>
>
> On 20. Apr 2007, at 20:59, Juan Falgueras wrote:
>
>> I have change the source of the list of paths for QuickOpen
>> included files. It works fine:
>
> Thanks, seems to work fine here as well. Some comments:
>
> • we should differ between <system> and "user" include paths
actually the script does consider <system> and "user" paths and get
first the "user" path not looking for TM_HEADER.. when "user"
if (!$header) {
$line =~ /#\s*include\s*([<"])(.*?)[">]/;
$local = $1;
$header = $2;
}
if ($local eq '"') {
$t = $ENV{'TM_DIRECTORY'};
if (-f "$t/$header" ) {
print "$t/$header";
system("mate -r \"$t/$header\"");
exit 0;
}
}
> • TM_HEADER_SEARCH_PATHS should default to the output from gcc/g+
> + (to not require user setup)
I have thought about it but, when? If you ask for echo | g++ -E -
v -x c++ - and then analyze the output (with the A.Tomazos perl
script, for example), you then don't want any TM_HEADER_SEARCH_PATHS,
but instead, to call to the g++ compiler for this. I've thought this
must be slow, and the answer to the previous query is near always
the same.
> • search path could depend on whether we are in source.c or
> source.c++ (the former has a smaller search path)
yes. The difference is (in my system):
C++
/usr/include/c++/4.0.0
/usr/include/c++/4.0.0/powerpc-apple-darwin8
/usr/include/c++/4.0.0/backward
/usr/local/include
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
versus
C
/usr/local/include
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
I have used the most frequently used C++ :)
> • additional search paths should be taken from the current Xcode
> project file, if any (and Xcode’s products build dir should also
> be a search path for frameworks)
oups! don't use XCode, sorry. I think it must be done asking XCode
(via AS) or hacking the XCode project file... (complicated and dirty) :(
> • need to handle framework inclusion, e.g. <Cocoa/Cocoa.h>
you are again wright:
% locate Cocoa.h
/Developer/ADC Reference Library/documentation/Cocoa/Cocoa.html
/Developer/ADC Reference Library/documentation/Cocoa/Conceptual/
CarbonCocoaDoc/Articles/CarbonInCocoa.html
/Developer/ADC Reference Library/documentation/Cocoa/Conceptual/
CarbonCocoaDoc/Articles/CarbonUIInCocoa.html
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/
Cocoa.framework/Versions/A/Headers/Cocoa.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/
JavaEOCocoa.framework/Versions/A/Headers/EOCocoa.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/
Cocoa.framework/Versions/A/Headers/Cocoa.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/
JavaEOCocoa.framework/Versions/A/Headers/EOCocoa.h
/System/Library/Frameworks/Cocoa.framework/Versions/A/Headers/Cocoa.h
is not found by this simple script and there are:
% find /System/Library/Frameworks/ -iregex ".*\/Headers\/.*\.h" | wc -l
2112
many.
It was not a problem for me since I am working in a UNIX standard
programming way...
> • need to handle import as well as include (in the regexp)
is is easy to add it
>
> And if I understood Chris correctly, he’d like to optionally
> search under /Developer/SDKs/«chosen SDK».
As far as I have understood this is included in your Frameworks plus
XCode dirs expansion search
>
> Are there other things we’d like to support?
(;
Hi,
Two things tripped me up just now using the reST bundle:
(1) I'm not sure if it's broken or not, but the Validate Syntax
command didn't work for me as it stands, and it's the first line
that's tripping it up for me:
`TRST=${TM_PYTHON:=rst2html.py}`
I found that most of the rest commands used `TRST=$
{TM_RST2HTML:=rst2html.py}` and when I switched it in for that, it
seems to be working.
Just out of curiousity, where/how is this $TM_RST2HTML environment
variable getting set, anyway (and what's `:=`)?
(2) I feel like the "Convert Document to HTML" command should have
its output set to "Create New Document" instead of replacing the reST
in the file w/ the HTML so you don't blow out the file you've been
working on.
Thanks,
-steve
Hi,
I have to write much XSL stuff. I use among others the snippet
collection of Andreas Schöller (BTW thanks for that).
He was so kind to add information about the valid values of parameters.
example:
Snippet ou =>
<xsl:output
name=""
encoding="utf-8|ASCII|US-ASCII|iso-8859-1|utf8|KOI8R|cp1251"
indent="no|yes"
use-character-maps="mapping1 mapping2"
method="text|html|xml|xhtml"
/>
As usual I can use TAB to jump to each ${n:} token.
Now my question:
Would it be possible to convert e.g. the token 'text|html|xml|xhtml'
into a pull-down menu?
I tried it this way:
After pressing TAB TM highlights 'text|html|xml|xhtml'; I invoke a
command:
`echo -en "$TM_SELECTED_TEXT" | ruby -e '
require File.join(ENV["TM_SUPPORT_PATH"], "lib/dialog.rb")
words = STDIN.read().split("|")
print words[(Dialog.menu words)]
'`
and I can choose what I want. After that, of course, I cannot use TAB
to navigate through the snippet any more, unfortunately.
I also tried a snippet like:
<xsl:output method="${1:`echo -en "text|html|xml|xhtml" | ruby -e '
require File.join(ENV["TM_SUPPORT_PATH"], "lib/dialog.rb")
words = STDIN.read().split("|")
print words[(Dialog.menu words)]
'`}" encoding="${2:`echo -en "utf-8|ASCII|US-ASCII|iso-8859-1|utf8|
KOI8R|cp1251" | ruby -e '
require File.join(ENV["TM_SUPPORT_PATH"], "lib/dialog.rb")
words = STDIN.read().split("|")
print words[(Dialog.menu words)]
'`}"/>
In principal this works and the TAB behaviour isn't disturb but I
have no visual feedback what I'm typing while the menus popping up
and the TAB mechanism starts at token 1 which I already entered.
Would it cost much effort to implement such a behaviour? Meaning if I
press TAB and within the new selection occurs a given delimiter (here
| ) or tag or what ever that the snippet parser will show this
selection as pull-down menu automatically without distroying the TAB
mechanism.
And, would it make sense as a global snippet feature?
Regards,
Hans
Forgive me if this is way too rudimentary of a question, but: I use TextMate
to compose some of my blog posts, and sometimes I copy/paste in text from
interviews I've done via email (or even chat). Is there any way to make
TextMate recognize when there's been a line break between two paragraphs and
auto-insert break tags? As it stands now, I need to go in and insert two
tags after every line-separated paragraph my interviewees write, which is
becoming a PITA.
Any thoughts are much appreciated
David Chartier
--
My work:
professional blogger, The Unofficial Apple Weblog: http://www.tuaw.com
Assistant Lead Editor, Download Squad: http://DownloadSquad.com
My play:
1FPS: http://www.dcharti.com/blog/
Vox: http://dcharti.vox.com
Hi
using Perl and C/C++ etc.. I think it would be very useful to
recognize (grammatically) when a call to a function is done. I know
this can be near impossible to solve (with regexps) in the Perl case,
since there is no need and many people not use parenthesis after the
name of the function. Anyway if you use them it should easily be
easy to recognize as function call.
If function calls are grammatically recognized, then the power of TM
will be increased with thinks like colouring, jump to the definition
(only active when in a function call scope), etc.
Juan F.
I don't know if this has been suggested before, but I'd like to right
click on a selection or an identifier (without having to double click
it first) and choose "Find in Project" which would give search results
in all files in a project (or a directory if I had opened one).
This would be great for quickly exploring code bases.
Is there a way to hook this up now given TextMate's flexibility and
the existence of the Edit -> Find -> Find in Project ?
-Chuck
Hi All
I am slowly making language bundles for the various languages used on
the Tandem (HP) NSK systems. So far I have been working on TAL, DDL
and the Make file syntax used by ACI. I also hope to do a COBOL/
SCOBOL bundle as well, as time available happens.
My question is this. At the moment it appears that all languages must
have their own separate bundle. Given that quite a few of these (in
particular DDL/Make and a couple of others) are going to be just
syntax highlighting, is it possible to have a combined bundle of
languages? or do I just suck down each desired language (there's not
many - maybe 6 or 7 by the time I eventually finish) having its own
bundle entry?
Cheers
Dean.
I'm having a problem populating the symbol list in my files. I have
created the following preference item:
{ showInSymbolList = 1;
symbolTransformation = 's/(^KW: )(.*)(%)/$2/;';
}
My document is filled with lines such as
KW: postscript essenceoftruth freedom % (fold)
However, the symbol list remains empty. I have double checked that
the scope selector for the preference matches the global scope of the
document and have closed the bundle editor window. Can someone help
me figure out why this is not working?
Thanks,
Colin Hahn
»Geben Sie mir Kaffee, dann mache ich Phänomenologie daraus.«
"Give me my coffee so that I can make phenomenology out of it." --
Edmund Husserl
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, everyone.
It seems, that in Bulleted Lists the URLs don't get matched as
underlined, if they are in a scope of a bulleted list.
Wouldn't it make sense to change the Grammar, so it has begin/end
clauses for bulleted Items and then make an include rule for it ?
One Side effect also, of this is that hitting the Enter key has no result.
regards, marios
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: This might change in the future
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGL/LF8tSzPOYuZvQRArbrAJ41564Jp/4Qco4TkJCskRB69SDTVQCgjYYV
co5cFXikJOmH/FeoQkbrY64=
=NuSj
-----END PGP SIGNATURE-----