I've been using TextMate for years and I'm productive and happy with it. However, I like to try other editors from time to time to see if I'm missing anything. Recently I spent some time learning Vim and I discovered a few things that I particularly liked.
1) Split windows -- not the kind of split windows you normally get in Mac applications, but the Vim style ones. In Vim you can easily navigate from the keyboard to your different splits and choose what files to display in each. Additionally, you don't have to reach for your mouse to create a split. When you split, Vim divides the space up for you which is what you want most of the time. I found that it is very handy when needing to view more than 1 file at a time, which in my case is most of the time. Closing splits is about as easy as they are to create -- all from the keyboard. Multiple windows isn't really the same thing because they are slow to setup and tear down.
2) Selective multifile grep -- in Vim you can use a regular expression to open a set of files, and then just grep across the open files.
3) Don't need arrow keys -- after years of editing with the mouse; I find it painful to reach for it. It hurts my right shoulder and shoulder blade. It even hurts to have to move my hand down to the arrow keys. However, in Vim it is easy to keep your hands resting on your keyboard with your shoulders relaxed. No reaching for the mouse or arrow keys.
I've used Whitesmith bracing style for *decades*, and had it kinda-sorta working in TM 1.5.x, though not perfectly. Now I've lost those old settings and for the life of me can't figure out how to get it even close in 2.0. There's clearly something fundamental that I'm missing, but I've spent hours on this off and on over the past few months, and I'm guessing that someone who really understands the rules (and regex) better than I, could get me on the right path in short order. I'd definitely appreciate it.
For those (unfortunate souls) who are not familiar with Whitesmith:
http://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style
Also, just as a general suggestion, it seems like it would be really helpful to have just a handful of "packaged" example indentation rules for the small handful of common bracing styles, i.e. Allman, K&R, Whitesmith, maybe Gnu. Of course it wouldn't be perfect for everyone, but it could be really helpful as a starting point. If you know of such a set of examples, please point me to them (yes, I've looked). Thanks!
Hi all,
I'm trying to develop a bundle for communicating with a TCP server, and
would like to create 1) a bundle command that opens the connection, and 2)
other commands that use that connection object (eg via grabbing text
selection in the editor window).
In Python, I've created a bundle command like this:
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = "127.0.0.1"
PORT = 7098
sock.connect((HOST, PORT))
sock.send("some command...")
print sock.recv(512)
That sets up the socket correctly, in fact you can send messages to the TCP
server.
However each time I send a command, the socket is obviously re-created; I
wondered if I TextMate provides a mechanism to save the 'sock' binding in
the current environment - so that I can reuse it later within other
commands.
Hope this makes sense - thanks in advance for any help.
Mike
Hi!
Q1: I recently updated to TM2alpha, and I'm quite fond of it! I mostly use
TM as my LaTeX editor. However, when I compile documents the log window
doesn't close when the PDF is viewed in Skim. I have made sure the "Keep log
window open" option is not checked. Actually I would like the window to show
only at errors
Q2: I would prefer to be able to chose the log window layout to be more
minimalistic, kind of terminal-like, as I find the default layout to be
unnecessary graphical and heavy. I've tried to google about a bit, but can't
seem to find if changing it is possible or not.
--
Holene
--
View this message in context: http://textmate.1073791.n5.nabble.com/Compiling-LaTeX-log-window-tp25794.ht…
Sent from the textmate users mailing list archive at Nabble.com.
Allan,
I solved the problem. In my Mac-side SSH configuration (OS X 10.8.4), I had
AddressFamily inet
listed in my .ssh/config. This limits ssh connections to using IPv4. If I disable that, then it works fine. For some reason the change to allowing IPv6 in TextMate in conjunction with the above openssh option fails. Disabling the AddressFamily line makes it work.
Related, I had "disabled" IPv6 on my Mac networking by setting it to "local link-only". It still works with that, but I get an error message on the server side from rmate:
setsockopt TCP_NODELAY: Invalid argument
This error goes away by changing IPv6 to "Automatic" in the Mac network settings.
So, it appears that the change to allowing for IPv6 actually requires it to be present.
Cheers,
Brian
> TextMate did switch to using IPv6 API instead of IPv4, but for me the
> above works w/o issues, I tried with TextMate listening for both local
> and remote clients, tried setting up tunnel via command line and
> ~/.ssh/config, all cases for me was a success.
>
> This is on OS X 10.8.4 using OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
> (the one in /usr/bin) and network has an IPv4 IP (obtained via DHCP) but
> no IPv6 IP (config set to ?automitcally? which gives me no values
> for the IPv6 things in network settings).
>
> Any mismatch in environment?
In R.app on Mac OSX, pressing tab after an object name and dollar sign will list all variables contained within that object. For example:
Pressing mtcars$ + TAB will list all variables contained in the mtcars dataset.
Pressing iris$ + TAB will list all variables contained in the iris dataset.
Is it possible to mimic this behaviour in a .R file in TextMate?
Ross
hi,
i wonder if it's possible to "exclude" scopes using the "scope
selector" setting for a snippet. for example:
the PHP bundle defines a tab-trigger for "array" that expands to $...
= array ... thats fine as long as i am really in the scope
"source.php". but when i am writing documentation (phpdoc -- which is
in fact "source.php", too) it's really annoying when the 'array'
keyword and such get's expanded.
i wonder what's the best solution to solve this ... would i have to
define a scope "phpdoc" and overwrite the tab-triggers in there or is
there any other solution?
thanks in advance,
harald
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
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