Hi all
I recently posted asking how to align code at <- . For example, I would want these two lines of code
foo <- test
fooFooFoo <- test
To look like
foo <- test
fooFooFoo <- test
Somebody suggestted installing the align bundle and using the keyboard shortcut CMD + CONTROL + 9. I've trice this but unfortunately it doesn't run and throws a message box saying 'Failure running Align Source'.
Can anyone come up with a hacky way of aligning code at <- ?
Ross
suppose i want to report a variable state in NodeJS and/or JavaScript, for
example:
console.log("myvar['"+property+"'] = "+myvar[property]);
because I'm a lazy guy, i want only to enter "myvar[property]", apart from
console.log.
at start, i would enter :
console.log(myvar[property]);
then copy/paste "myvar[property]" :
console.log(myvar[property]myvar[property]);
adding " = +":
console.log(myvar[property] = myvar[property]);
then surrounding "myvar[property] = " by '"':
console.log("myvar[property] = "+myvar[property]);
i want to see the property value in the "left" hand side, then i sourround
"property" by '"':
console.log("myvar["property"] = "+myvar[property]);
here is my suggestion, could it be possible by selecting "property" to add
two "+" signs on each side of "property" in order to make it :
console.log("myvar["+property+"] = "+myvar[property]);
could that last step be implemanted in TextMate ?
--
Yvon(a)48.871651804,2.384858688
Just found this exciting tip in the November archive:
> or install the bundle from
> https://github.com/tbates/align.tmbundle
Works great at least with Perl-code - thanks!!
Hi all,
When trying to search a folder of .nib-files, I ran into a few problems.
The files are nicely displayed in TextMate, but I cannot search the
contents of the files. Whilst trying to work around it, I ran into two
problems:
1. *Find > In > Open Files not available*
I opened the lot to use Find > In > Open Files, but this option is
unavailable. Screenshot below. I tried opening .txt-files, and I
tried creating new files, but it remains unavailable.
Is this function available to anybody?
2. *Add file-type to TextMate*
To facilitate the opening of said files in Finder's context menu
(open with), and to encourage TextMate to search their contents, I
tried to associate them with TextMate. I failed.
First I tried to add them via TextMate.app\Contents\Info.plist. This
invalidated TextMate's code signing, and thus broke its connection
with /Keychain Access/. Nor did it have the desired effect.
Thus I reverted my actions, and tried to associate the file type via
the bundle editor. I added "nib" to the Property List bundle, old
style language grammar file types, reset the launch services
database regarding TextMate and killed Finder.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
-f /Applications/TextMate.app/;killall Finder;
No luck. TextMate still does not appear in "open with", and TextMate
still refuses to search their contents.
Does anyone have a tip on how to achieve this?
By the way, to search the .nib-files, I renamed them to .txt, and chose
Find in Folder. That worked. But it's a long way round.
Thanks,
Rasmus Malver
TextMate Find in Open Files not available
Recently, I've added the Dart.tmbundle to TextMate 2.
It works OK however I'd like adding a "Dart_file.icns" in order to get the
right icon.
I've added some lines in the Info.plist of TextMate 2, the Icon file into
the Resources directory but nothing change.
Then, what is the correct way to add a file icon into TextMate 2 ?
Also, using applescript, i've found the identifier for *.dart files, it is
part of archive file one terminating by -dart, strange...
Before any trick the file icon was of a dmg one...
--
Yvon(a)48.871651804,2.384858688
Hi,
I am experimenting with embedding properties in Objective-C implementations that will be parsed out and placed into a header file, and that also include documentation. They are supposed to look like this:
/*@property BOOL testProperty;
Sample Property
# Discussion
This is documentation in Markdown syntax
*/
My custom Objective-C language definition includes this pattern:
{ name = 'meta.property.objc.embedded';
begin = '^(/\*)(?=\@property)';
end = '\*/';
beginCaptures = { 0 = { name = 'meta.comment.embedded-property.start'; }; };
endCaptures = { 0 = { name = 'meta.comment.embedded-property.end'; }; };
contentName = 'meta.scope.property.objc.embedded';
patterns = (
{ name = 'meta.scope.property.def.objc.embedded';
begin = '(?=\@property)';
end = ';\s*\n?';
patterns = ( { include = 'source.objc#interface_innards'; } );
},
{ name = 'meta.scope.property.doc.objc.embedded';
begin = '^';
end = '$\n';
// patterns = ( { include = 'text.html.markdown'; } );
},
);
},
That works fine, the /* and */ have the proper start/end scope, the documentation part has the doc scope etc. But as soon as I enabled the uncommented line that is supposed to highlight the embedded documentation with markdown, markdown gobbles up the end markers.
Shouldn't the outer pattern prevent this? And if not, how can I make this work?
Thanks
Gerd
There’s pretty annoying bug in TM2 regarding remembering default window frame.
(1) Launch TM2
(2) Open new document & maximize window via (+)
(3) Quit TM2
(4) Open it again
(5) Open new document, it should be zoomed/maximized
(6) Restore it via (+)
Poof… where did it go? It is here in lower left corner of the screen with 0 content height :~(
Can we have make TM2 remember regular window frame (not zoomed) and if window was zoomed?
Cheers,
--
Adam
On 27.11.2013, at 06:11 , Owen Densmore wrote:
> My home folder has many folders, many of which I'd like to have be in
> multi-folder projects. So ~/bin and ~/notes are a pair, while a second
> pair are ~/bank (receipts) and ~/config (a collection of configuration
> files used elsewhere)
>
> If I understand correctly, I'd have to have a .tm_properties file for each
> pair, not possible given the file hierarchy style of projects
You'd want to have a .tm_properties file in you user directory which sets the defaults. Then in many cases, you don't need to create a per-»project« .tm_properties file.
The .tm_properties files in nested directories apply in addition to defaults. For instance, you probably want to use different include/exclude rules in the directory where you're writing code for a numerical simulation than in the directory where you write the article in LaTeX with the associated findings.
Allen made a conscious design decision to abandon project files and base the idea of projects just on filesystem hierarchy. In some ways, that makes TextMate 2 more powerful than TextMate 1.x, but other things (especially working with scattered files) has become more complicated because a folder is a »single project«.
Personally, I haven't found a good way to recreate my TextMate 1.x workflow in TextMate 2 (symlinks don't mesh well with my LaTeX code and my git repositories). You probably have to adapt the way you organize your work.
I have created a sensible master .tm_properties file and since I essentially only work with TeX-related files, shell scripts and markdown files, I don't really need to change them. Instead of symlinking, I just copy files and keep them in sync by hand if need be.
Max
Thanks for the help!
> On Mon, Nov 25, 2013 at 2:52 AM, backspaces wrote:
> > First, each folder would need their own .tm_properties files. This
> means if
> > the same folder is in multiple projects, you have no exclude/include
> files
> > capabilities for the multiple projects. Each project would have to have
> the
> > same contents, according to their folders' .tm_properties file.
> The folder being included in multiple projects does not require its
> own .tm_properties file.
> Each project folder can have its own .tm_properties file with its
> own configuration, but note that, as Allan said, symbolic links to
> folders are currently not expanded.
>
Is "project folder" different from any other, other than the .tm_properties
and the fact that it is a folder rather than a file?
Not sure if this makes sense in your context but maybe you can try
> changing your workflow and treating your shared folder as a project on
> its own (having its own window open along other projects, etc). I
> have a couple projects that depend on other projects and I work this
> way in order to have Go To File and searching capabilities in the
> subprojects.
OK, sounds reasonable.
> > Second, lets presume my project starts in my home directory. Then I can
> > have only one project there, specified by the .tm_properties file, which
> > would have to include my multiple folders. Thus my home directory can be
> a
> > project folder for only a single project. (Yikes!)
> Just curious: why would you want your home folder to be a project
> folder? One usually wants the home folder to have one or more project
> folders inside. I have a folder for each project and all of them are
> in a Developer folder in my home folder.
My home folder has many folders, many of which I'd like to have be in
multi-folder projects. So ~/bin and ~/notes are a pair, while a second
pair are ~/bank (receipts) and ~/config (a collection of configuration
files used elsewhere)
If I understand correctly, I'd have to have a .tm_properties file for each
pair, not possible given the file hierarchy style of projects
> Third, a work around would be to simply have a separate folder per
> project,
> > containing symbolic links (ln -s) to the folders I want in my project.
> This is not a workaround, this is the expected way to handle projects.
A-ha! OK, so I can make a TM folder that contains a folder for each of my
TM projects, each of which in turn have symlinks to my actual folders?
That fixes everything.
> Sorry: one last question: I'd like my projects to be double-clickable to
> open
> > them. Can I do that?
Interesting, I'll look into that. Thanks!
> I know this can be done by using the Favorites feature. From Mate's
> drawer, you can navigate then right click a folder and add it to
> favorites, and all your favorites are available from the heart icon in
> the bottom right, or from File, Open Favorites... .
> Hope that helps,
> --
> :: dip
> --
Thanks for the help, I appreciate the time & effort.
-- Owen