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!
I tried to open a folder in TextMate today (one I open often) and it
crashed. (It was already running, as always.) Ever since, I’ve been
unable to get it to launch.
It detects the crash and asks about restoring open documents. It crashes
no matter what I choose there.
I haven’t changed any preferences or bundles or installed any updates
today.
I’ve tried:
* `defaults delete com.macromates.TextMate.preview.LSSharedFileList`
* `defaults delete com.macromates.TextMate.preview`
* `mv ~/.tm_properties ~/foo`
* trashed `~/Library/Saved Application
State/com.macromates.TextMate.preview.savedState`
* trashed `~/Library/Caches/com.macromates.TextMate.preview`
* restored `~/Library/Applicaiton Support/Avian` and `TextMate` from
a backup taken this morning
* downloaded the app again from the web site
* tried an older version (beta 7.3)
* rebooting, like a poor beleaguered Windows user
The only thing that *did* work was launching it as a different user, so
it’s something with my account, but what’s left?
I haven’t tried deleting all my bundles, but from the dates, I don’t
think any have changed since March.
From the crash log:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_platform.dylib 0x00007fff94e40331
_platform_memmove$VARIANT$Ivybridge + 49
1 com.macromates.TextMate.OakTextView 0x000000010f92dfe1
oak::callbacks_t<ng::callback_t, false>::remove(ng::callback_t*) + 105
2 com.macromates.TextMate.OakTextView 0x000000010f8feeea
-[OakTextView setDocument:] + 437
3 com.macromates.TextMate.OakTextView 0x000000010f8f0584
-[OakDocumentView setDocument:] + 643
4 com.macromates.TextMate.OakTextView 0x000000010f8f01f4
-[OakDocumentView dealloc] + 457
5 libobjc.A.dylib 0x00007fff9676389c
objc_object::sidetable_release(bool) + 236
6 libobjc.A.dylib 0x00007fff96749e8f (anonymous
namespace)::AutoreleasePoolPage::pop(void*) + 575
7 com.apple.CoreFoundation 0x00007fff93a6b6f2
_CFAutoreleasePoolPop + 50
8 com.apple.Foundation 0x00007fff89f13762
-[NSAutoreleasePool drain] + 153
9 com.apple.Foundation 0x00007fff89f2d5cc
_NSAppleEventManagerGenericHandler + 121
10 com.apple.AE 0x00007fff8d45934c
aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned
char*) + 531
11 com.apple.AE 0x00007fff8d4590c9
dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 31
12 com.apple.AE 0x00007fff8d458fd3
aeProcessAppleEvent + 295
13 com.apple.HIToolbox 0x00007fff90935c6e
AEProcessAppleEvent + 56
14 com.apple.AppKit 0x00007fff8e357da2 _DPSNextEvent
+ 2249
15 com.apple.AppKit 0x00007fff8e356e58
-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
16 com.apple.AppKit 0x00007fff8e34caf3
-[NSApplication run] + 594
17 com.apple.AppKit 0x00007fff8e2c9244
NSApplicationMain + 1832
18 com.macromates.TextMate.preview 0x000000010f533f19 main + 840
19 com.macromates.TextMate.preview 0x000000010f51e914 start + 52
Thanks!
--
Rob McBroom
http://www.skurfer.com/
Hi everyone,
I want to fold the following 'code'
# Section 1 ----
for (i in 1:30) {
y = i+1
}
# Section 2 ----
# a comment
x = y + 1
y = y^2
if (foo) {
a = b
for (j in 1:3) {
b = b + 1
}
}
# Section 3 ----
b = c
to fold in the following way:
- "sections" in the code are defined by #something----, everything
between two section titles should fold when the folding marker of the
title line is clicked
- blocks are defined with { (and a few other markers) and should fold
as expected.
With the following rules I can almost make it work
{
foldingStartMarker = '\{';
foldingStopMarker = '\}';
foldingIndentedBlockStart = '^#(.*?)\-{4,}';
foldingIndentedBlockIgnore = '^(?!#(.*?)\-{4,})';
}
the blocks fold, respecting nesting, the sections fold up to the next
section, *except* for section 1; there, the `for` block is not
indented and is at the same level as the section, therefore folding at
section 1 only folds until the start of the for block, not all the way
down to section 2.
It looks like I am searching for a way to the `foldingIndentedBlock`
rule to take precedence over the `foldingStartMarker` rule. Is it
possible?
To make it easy to take a stab at it, I created a new bundle and a
test file (the language is "testing") which you can get there:
https://dl.dropboxusercontent.com/u/1047321/Test.zip
PS: having comments which define sections in the code seems like a
general use case. The syntax is in that particular example is defined
in the R language by the RStudio IDE. This IDE is becoming common
enough that I am receiving code formatted this way a lot.
Thanks in advance for your help!
Hi,
Today I wanted to try a new theme and noticed that the theme menu only
lists the theme's name, so I had to try them all, which is expected.
My issue is that I already knew I wanted a light theme, because I like
them better. I just asked around and at least with the small sample
of people around me, they already know if they prefer light themes or
dark themes.
It looks like themes are already identified as light or dark via their
Semantic Class, so my suggestion is to include this distinction in the
UI somehow. I know this is not something the user will do frequently,
but I think this improvement will cut the time to select a new theme
roughly by half.
--
:: dip
--
Thanks to all the help from this list: my GitHub Markdown bundle now supports (in some form) all the functionality in GitHub Flavoured Markdown and has a preview feature that displays them all. Check it out:
https://github.com/mikemcquaid/GitHub-Markdown.tmbundle
I’m interested in working on what’s required to get this as an “official” bundle; what would that require? I’m happy to make changes and fix issues that may block this being changed.
Cheers!
Mike McQuaid
http://mikemcquaid.com
Hi,
I'm using TextMate 2.0-beta.8 on OS X 10.11.1 with v3.2.1 of the Go bundle
from:
https://github.com/syscrusher/golang.tmbundle
When I type "fmt." and press Option+Escape for code completion, it
uses TextMate::UI.complete with the :case_insensitive => false option.
That didn't seem ideal to me. All exported identifiers in Go begin with a
capital letter, but in terms of filtering, I would expect lowercase "p" to
filter to Print just as well as an uppercase "P".
So I modified the bundle, and then I saw why it is set the way it is.
In the completeAndInsertSnippet method of TMDIncrementalPopUpMenu.mm there
is a line that inserts the text being used for filtering rather than the
text from the choices.
insert_text([candidateMatch substringFromIndex:[[self filterString] length
]]);
The result is that fmt. [option+esc] [p] and pressing [Enter] gives me:
fmt.print
rather than the desired:
fmt.Print
I'm not really sure why it's done this way? Are there situations where
people want their filtering keys over the text present in the menu?
While I'm talking about code completion, and to drive the point home, I
noticed that TMDIncrementalPopUpMenu uses a BEGINSWITH predicate. Ideally
it would use a fuzzy match with similar logic to Go To File... That would
allow typing something like:
fmt. [option+esc] [p] [l]
to get Println from the list of candidates. In this case it becomes obvious
that "pl" is only for filtering and should not be inserted.
Finally, it would be great if it was possible to set an (additional) Key
Equivalent with a delay so that the popup menu came up when pressing ".",
or perhaps something more sophisticated based on the language grammar. I
realize that not everyone likes code completion popups automatically
appearing, but it would be nice to at least have the option.
Thanks,
Nathan.
--
Nathan Youngman
https://www.nathany.com
Hi,
Sometimes the scroll bar at the bottom of the window indicates that there is a very long line somewhere, but a visual scan scrolling from top to bottom of the file doesn't show any line going beyond (or even near) the right edge of the window. This isn't a show stopper of course, but it would be nice to have a command of the form "select the longest line in the file and scroll to show it". Is there such a thing? If not, is there an easy way to add on a user tool to do the trick?
Thanks,
Bill