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.
TextMate 1 or 2, is there a way to auto-highlight all occurrences of
selected word?
I was from Windows using EditPlus, when I double-click or Ctrl+W to select
a word, EditPlus is able to automatically highlight all occurrences in a
different background colour, very nice and useful feature.
With TextMate I have to additionally hit Opt+Cmd+F, and highlighting colour
is same as selected word, not eye-catching. I use 'soft' and light
background for selection background but I prefer bright background (eg
yellow) for highlighted words.
Ctr-S not really meets what I need.
Thanks.
--
Sent from my mobile. Ignore the typos unless they're funny.
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 all,
Are there any plans to add code fold guides to TextMate 2 (as shown here:
http://darwinsantos.com/sublime_screen.png)?
I know a workaround to get a similar effect is to use "Show Invisible
Characters". Though the problem with this is that a lot of files written by
others lack proper tab indentation.
Any other workarounds to get a similar effect?
Many thanks,
S.P.
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.
Hi all,
As of only very recently, I get the following drop-down error box when I
try to typeset a LaTeX document:
| Failure running "Typeset & View (PDF)".
|
| Typeset & View (PDF):4: undefined method `+' for nil:NilClass
(NoMethodError)
I think it was working until 1-2 updates ago.
Andrew
I found a strange behavior that I believe is a bug. I am using 2.0-alpha.9503 on OS 10.9.1.
First I redefined the keyboard shortcut for "Comment Line" in the system Preferences. This command is from the "Source" bundle and appears as alternative shortcut to the default ⌘/ in the bundle menu (I used ⌘- in order to avoid the rather clumsy command for german keyboard layout).
Right after that both shortcuts work fine. After closing and reopening TextMate, only the default shortcut ⌘/ works, the new shortcut is now ignored.
When I select Bundles -> Source -> Comments I can see that the commands are still set correctly. After that, both shortcuts work again, until I close TextMate and open it again: the new shortcut is ignored until the menu selecting Bundles -> Source -> Comments is opened up, after that it works till closing TextMate again.
I was struggling some time with this issue, without solution. Now after testing for writing this bug report, at least there is a simple workaround. But maybe it can be resolved. I also tried changing the Bundle "Source" itself, but that didn't do the trick either.
Martin
Hi,
I came across with a rendering bug,
to reproduce it copy the following two lines and paste them into a TM document:
587 3 402 ̃ wa:w.4 NULL NULL NULL NULL
591 3 402 kha:ŋ.4 kha:w.4 NULL NULL NULL NULL
On my machine OSX 10.9.1 TM 2.0-alpha.9503 these lines are rendered as shown in that picture:
The "problem" seems to be that TM is not able to get rid of a TAB {utf8: 09} (and I believe this's true for each CONTROL character) followed by a combing diacritic - in that case a combining tilde {utf8: CC 83}. The actual data in the TM window are correct, you can e.g. look for TAB characters. If you remove the combining tilde TM renders the text correctly.
I'm aware that this is actually my fault since a combining character shouldn't appear after a control character and "more actually" I'm glad that TM had this bug thus I could find my fault ;) but I think TM should do it like other Mac apps e.g. TextEdit.
For safety reasons I attached a UTF-8 text file containing both lines.
Cheers, Hans
I attempted to build the MacPorts textmate2 port, originally for 2.0-alpha.9537, and got an "unknown signee" error during configure when it attempted to download the bundles.
I reported it on MacPorts Trac: https://trac.macports.org/ticket/43466. That ticket contains the steps I took and also now contains what I did to get the build to work.
My problem seems very similar to
http://lists.macromates.com/textmate/2013-February/035922.htmlhttp://textmate.1073791.n5.nabble.com/Unknown-signee-errors-td25943.html
and
http://permalink.gmane.org/gmane.os.apple.macports.tickets/68860
I think that there might be a couple of issues in key_chain.cc.
In file key_chain.cc, the line
if(err = SecItemImport(data, NULL, &type, &format, 0, ¶ms, NULL, &items) == errSecSuccess)
causes variable err to be set to the result of the logical expression, whereas the intent is to set it to the return value of SecItemImport. Needs either parentheses or splitting into an assignment and an if(). I chose the latter as in the diff output below.
Also, the documentation for SecItemImport (at https://developer.apple.com/library/mac/documentation/security/Reference/ke…) shows that the sequence of parameters &type and &format is wrong. I reversed them.
These changes didn't fix the problem but at least showed that SecItemImport was returning errSecAddinLoadFailed. On a hunch, I changed both &type and &format to pass the "unknown" enum and that fixed the problem.
I've included below the diff of the resulting changes, with a long comment added explaining that I didn't investigate whether both &type and &format needed to be changed or just one. If I had to guess, I'd say it was &format.
I have no idea why this was a problem for me and not for others.
The diff:
*** /tmp/key_chain.cc 2014-06-12 15:55:45.000000000 +1000
--- /tmp/key_chain.cc_orig 2014-06-12 15:55:45.000000000 +1000
***************
*** 31,56 ****
bool res = false;
SecItemImportExportKeyParameters params = { .keyUsage = NULL, .keyAttributes = NULL };
! /*****************************************************
! /* Specifying the expected Item Type and Format
! * caused SecItemImport to return
! * errSecAddinLoadFailed.
! * I didn't check whether it was due to both being
! * specified or just one. Setting to the Unknown enum
! * worked.
! * Original code on next two comment lines.
! /* SecExternalItemType type = kSecItemTypePublicKey;
! /* SecExternalFormat format = kSecFormatPEMSequence;
! * Updated code with both vars set to unknown on next
! * two lines. */
! SecExternalFormat format = kSecFormatUnknown;
! SecExternalItemType type = kSecItemTypeUnknown;
CFDataRef data = CFDataCreateWithBytesNoCopy(NULL, (const UInt8*)_key_data.data(), _key_data.size(), kCFAllocatorNull);
CFArrayRef items = NULL;
OSStatus err;
! err = SecItemImport(data, NULL, &format, &type, 0, ¶ms, NULL, &items);
! if(err == errSecSuccess)
{
_sec_key = (SecKeyRef)CFArrayGetValueAtIndex(items, 0);
if(_sec_key != NULL)
--- 31,43 ----
bool res = false;
SecItemImportExportKeyParameters params = { .keyUsage = NULL, .keyAttributes = NULL };
! SecExternalItemType type = kSecItemTypePublicKey;
! SecExternalFormat format = kSecFormatPEMSequence;
CFDataRef data = CFDataCreateWithBytesNoCopy(NULL, (const UInt8*)_key_data.data(), _key_data.size(), kCFAllocatorNull);
CFArrayRef items = NULL;
OSStatus err;
! if(err = SecItemImport(data, NULL, &type, &format, 0, ¶ms, NULL, &items) == errSecSuccess)
{
_sec_key = (SecKeyRef)CFArrayGetValueAtIndex(items, 0);
if(_sec_key != NULL)
regards - David