Benjamin Steigmann
blissentia(a)mac.com
Hi, I have a question. When I installed textmate, it did not create
an application support folder. Why might this be?
Is impossible to access "Edit -> Indent line" since it is binding to
Cmd-Opt-]
On the other hand in Sp keyb. you must press Opt fot access ] or
[ keys....
] = Opt-]
actually the ]-key contains the *+] chars, * is with Shift, + is the
default and, I've said ] is with option.
then if you press Cmd-Opt-] you always get "Edit -> Shift right" as
if you've pressed Cmd-]
Hi,
Allan seems to be back, so here's a question: Will there be a
maintenance release soon that contains a fix for the endless loop
when editing python?
I know this is fixed in svn, but I prefer to use official released
stuff instead of svn versions... :-P
Bye,
Nico
Hi,
I was wondering what the best approach to enable this functionality
would be:
I use reStructuredText as the format of my doc strings in my python
files, and so I'd like to enable the reStructuredText snippets,
macros, etc. to fire in my python """ ... """ strings.
The scope of these strings in the Python files are:
string.quoted.double.block.python
Should I just add this scope to all of the commands in the
reStructuredText bundle, so all of the scopes for those commands
would be changed to:
text.restructuredtext, string.quoted.double.block.python
Or should I change the Python grammar to somehow set those two scopes
for the """ ... """ string matching pattern (I'm not sure if you can
do that, though).
Thanks,
-steve
Hi Everyone,
I have the strangest problem that I'll be darned if I can figure out
how to fix. When I double click a word, it selects all the words left
and right until it hits some sort of non-text or non-whitespace
character. So when typing normal text it selects the entire sentence
all the way left and right until a period or the end of the window. In
C coding, it selects until some sort of other style character " [ () ]
* _ " etc. I figured out how to list TM_CURRENT_WORD and it is not
just a word, but the whole sentence so clearly something is screwing
the way that gets parsed. Its really quite annoying and I'm pretty
sure it didn't always do this.
Any help would be greatly appreciated. I've googled around a bit,
including in the list and haven't found anything useful.
cheers,
Max
------------
Max Rietmann
mar76(a)cornell.edu
Is discontiguous text selection possible with TextMate?
On a somewhat related note (this is a long shot...), does anyone have
any idea what the -[OakTextView setMarkedText:selectedRange:] method
is supposed to do? I can't seem to have it make any effect on my
OakTextView...
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools
http://scan.dalo.us
I have been using different approaches to Transpose chars and
transpose words in AlphaX for a long time.
The usual way is really annoying, it swaps the chars around the
cursor. In the Cocoa (emacs-like) version it is also not symmetric:
if you do it two times the result is not the original (!)
Usually you notice you made a mistake after you have written the
chars. It is annoying to need to position yourself between the last
two chars to swap them.
The approach I use (and many Alpha users) is
transpose the last really chars, though spaces or parenthesis, etc
could be in between the cursor and the last two chars!
transpose word in this way is even better, since it also can swap
function arguments, etc.
Here I send the source for this to commands:
---------------------------- transpose chars ^T (v)SelecText|line (^)
ReplaceSel
#!/usr/bin/env ruby
sel = ENV['TM_SELECTED_TEXT']
if sel != nil
sel = sel.dup
sel.gsub!(/^(\w)(.*)(\w)$/u, '\3\2\1')
print sel
exit 0
end
left = ENV['TM_CURRENT_LINE'][0, ENV['TM_LINE_INDEX'].to_i]
right = ENV['TM_CURRENT_LINE'][ENV['TM_LINE_INDEX'].to_i .. -1]
left.gsub!(/(\w)(\W*)(\w)(\W*)$/u, '\3\2\1\4')
print left + right
----------------------
---------------------------- transpose chars ^-Opt-T (v)SelecText|
line (^)ReplaceSel
#!/usr/bin/env ruby
sel = ENV['TM_SELECTED_TEXT']
if sel != nil
sel = sel.dup
sel.gsub!(/^(\w+)(.+?)(\w+)$/u, '\3\2\1\4')
print sel
exit 0
end
left = ENV['TM_CURRENT_LINE'][0, ENV['TM_LINE_INDEX'].to_i]
right = ENV['TM_CURRENT_LINE'][ENV['TM_LINE_INDEX'].to_i .. -1]
left.gsub!(/(\w+)(\W+)(\w+)(\W*)$/u, '\3\2\1\4')
print left + right
--------------------------------
I use a lot a command that I call "quickSearch" that look for the
next text equal that the one that is selected. It is very useful
since you can find quickly var declarations, etc. only selecting the
word (you'll need only the keyboard!) and press, for exmple Shift-
Ctrl-Opt- -> or Shift-Ctrl-Opt- <- (arrow keys) for
quickSearchBackward.
The only way I've found is building the macro:
copySelectionToFindPboard:
findForward:
or the analogous for findPrevious:
The problem is with this simple action I destroy the FindPboard and
this is an unnecessary, I think, colateral effect.
Have s/o solve this not destroying the FindPboard?
Another:
I love to reread the last closed file in a time sorted (stacked)
way: last closed file, first one to open. This also allows me to
open several files (and close) them quickly.
I used to use Ctrl-Opt-O for that process in AlphaX. I can't find
the way for doing this with TM. I think you should save in a file
the history of open files, or so... TM haven't memory variables, in
any way. Alpha has an embedded interpreter inside it and then read
many many procs and variables at start and is easy to refer to them
and also has open-hook and close-hook procs that make this stack
very easy.
Any idea?
-- juan
Hello everyone,
I'm new to many things here -- textmate, regular expressions, etc,
etc. so I hope this isn't too far off topic for this list (apologies
in advance if it is). I'm trying to figure out how to do something
using find/replace. I have a long bibliography that was sent to me
as a single line of text. I'm trying to find a quick and elegant way
to insert line breaks between each of the individual citations.
Here is an example of the text I'm working with:
> Baddeley, A. "Working Memory." Science. 255: 556-559,1992. Baecker,
> R. J. Grudin, W. Buxton, et al. Readings in Human-Computer
> Interaction: Toward the Year 2000. USA: Morgan Kaufinann
> Publishers, Inc. 1995. Bevirt, B. "Designing Hypertext Navigation
> Tools.'' Digital Information Group, National Center for Atmospheric
> Research web site: < http://www. schlucar/dig/bra.inb/design/
> navtool.D.html>. 1996. Chandler, P. and J. Sweller. ''Cognitive
> Load Theory and the Format of Instruction." Cognition and
> Instruction. 8: 293-332, 1991. Chandler, P. and J. Sweller. 'The
> Split Attention Effect as a Factor in the Design of Instruction."
> British Journal of Education Psychology. 62: 233-246, 1992.
I'm just figuring out how to use regular expressions (sorry, not a
programmer) and I've been able to successfully select the endpoint of
each of the citations using:
\d{4}\.\s
My problem comes about when I try to replace the space represented by
\s with a carriage return. I'm not sure how to structure this in the
find/replace dialogue. Is anyone willing to point me in the right
direction here? I'm hoping to end up with something that looks like:
> Baddeley, A. "Working Memory." Science. 255: 556-559,1992. Baecker,
> R. J. Grudin, W. Buxton, et al. Readings in Human-Computer
> Interaction: Toward the Year 2000. USA: Morgan Kaufinann
> Publishers, Inc. 1995.
>
> Bevirt, B. "Designing Hypertext Navigation Tools.'' Digital
> Information Group, National Center for Atmospheric Research web
> site: < http://www. schlucar/dig/bra.inb/design/navtool.D.html>. 1996.
>
> Chandler, P. and J. Sweller. ''Cognitive Load Theory and the Format
> of Instruction." Cognition and Instruction. 8: 293-332, 1991.
> Chandler, P. and J. Sweller. 'The Split Attention Effect as a
> Factor in the Design of Instruction." British Journal of Education
> Psychology. 62: 233-246, 1992.
Thank you for any help you can offer.
--
j.
Is there any way to access the commands (API?) that are listed when
you build and then saving a Macro?
I think accessing them should make the programmer live really easier.
For example, you could send to TM, from an scripting program, a
sequence of such commands and TM could easily interpretate them.
-----
Juan
juanfc(a)lcc.uma.es