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
I have a feature suggestion. I've thought about this for years but it has only just occurred to me to say something about it.
As you know, I use TextMate to write books. Big books with big chapters. So it often happens that I edit a chapter, then jump to an earlier / later bit of that same chapter to make some change entailed by what I was just writing. Now I want to "go back" to where I was before.
That's the suggestion. TextMate should _automatically_ maintain "bookmarks" for the location of the two most recent edit locations (places where I actually typed or deleted text). Thus, I could use the bookmarks feature to jump back to where I was before.
Just an idea. (A really great idea!) m.
--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do
iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
Hiya,
Is it possible for a bundle command to accept a single selection and return multiple selections (or just carets)?
Here’s an example (brackets indicate selection, | is a caret );
Stage 1:
state: …class="|dark-theme"…
action: select "dark-theme"
Stage 2:
state: …class="[dark-theme]"…
action: [Hypothetical caret split command]
Stage 3a:
state: …class="[dark]-[theme]"…
or
Stage 3b:
state: …class="|dark-|theme"…
Then I’d press command T to switch from "dark-theme" to "theme-dark".
Im not sure what the logic would be in the bundle, my use would be served by simply returning the caret at the beginning and end of my selection (then command + w to select the word).
I’m also curious how Filter Through Command’s behavior could be reproduced in a bundle command, where the commands results are distributed to each line.
Thanks everyone!
Graham P Heath
ps: I’ve got some serious love for multiple carets ♥️♥️♥️
Dear All,
the subversion bundle (and all the ruby bundles) are broken since I update to yosemite few weeks ago.
I have been trying to fix the problem but I had little luck so far.
For what I understand is a problem related with the wrong default ruby version in yosemite (2.0 instead of the bundle supported 1.8).
A typical error that I get is something like, e.g. for svn status:
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require': /Users/umbe/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/shelltokenize.rb:74: invalid multibyte escape: /[^\w_\-\+=\/\x7F-\xFF]/
[...]
For what I understand each bundle should run ruby thought the ruby18 script which should install the the 1.8 version int he bundle support if it can’t find ii installed on the system. Unfortunately this seems not to be the case.
I have tried a bunch of things but without much success. I have installed ruby 1.8.7 with rvm and defined the TM_RUBY variable to point at it but nothing happened (later I realized that TM_RUBY is not meant for bundles).
I have reset the textmate 2 prefereces chance and variables in the hope to stimulate ruby18 to do its job but with no success.
Do you have any suggestion on how to fix is or at least help me in the debug process (I find a bit complicated to figure what a bundle is doing)?
Thanks
Umberto
Is there a memory leak in TextMate? I was running Activity Monitor and saw a memory usage spike. The application also became unresponsive, so I sampled it before doing a force quit. Here's what it came back with:
Not sure if it's relevant, but I was using a custom assembly language bundle at the time. The odd thing is I don't think TextMate was even the active application at the time the memory spiked. Very weird.
Ted
I’m trying to create a command using AppleScript to open CodeKit and select the CodeKit project associated with the current TextMate 2 project.
CodeKit’s docs want this:
tell application "CodeKit" to select project containing path "~/clients/aProject/app.scss”
So I wrote this:
#!/bin/bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
osascript <<EOF
tell application "CodeKit" to select project containing path "$TM_PROJECT_DIRECTORY"
EOF
That launches CodeKit but does not select the project; CodeKit opens to the last used project, not $TM_PROJECT_DIRECTORY.
I’ve tried both “TM_PROJECT_DIRECTORY” and "’$TM_PROJECT_DIRECTORY’”.
What did I get wrong?
Bob
-------------------
Robert J. Rockefeller
Richmond Hill, GA
www.bobrockefeller.com