The "folding away ugly docstrings" makes me wonder, would it be
possible wire up a command that folds elements in the document based
on their scope?
It's a bit different than folding on their nesting level, but I think
can be pretty handy. Especially for things like (ugly) docstrings :-)
Consider it a future feature request if it can't currently be done.
Thanks,
-steve
Hi everyone... I catalog my external media using the 'tree' command
and this generates a file such as the one attached.
Does anyone know of a bundle developed to allow folding for this?
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