I have just discovered TextMate, and am so far very happy with it,
but I think I just hit a glitch...
I am trying to edit a SQL load file that is about 5M, which shouldn't
be a problem. However, some of the lines are very long, as a complete
website contents is in a single line. I have no idea how many
characters are in this line, but I suspect about 2M worth.
Anyway, TextMate hangs while trying to work with this file. I can't
do much at all. Even a simple act of scrolling hangs. TextEdit does a
reasonably good job with the file though...
Actually, I don't think it is hanging, as it eventually responds
(about 30 seconds later), but it is so slow that it is completely
unusable. Is this a known problem? For me, it is weird files like
this that we need an editor like TextMate to be able to easily handle.
Thanks...
Jim Leask
Hi!
I'm just working on some Tex-Document which uses several dialogues
which I want to enclose in "< "> (the result are those <<
>>-enclosures in the document). Would be cool if that could be added
to the language grammar.
Thanks in advance
Niels
Hi Allan and friends,
I have a source tree structure like this:
www/
site/
index.tcl, .adp
one.tcl, .adp
edit.tcl, .adp
item/
index.tcl, .adp
one.tcl, .adp
edit.tcl, .adp
The fact that files are named the same, but in different directories:
- Confuses both the Cmd-Opt-Up "Go to Header/Source" feature, which
will gladly find www/item/one.adp when I'm editing www/site/one.tcl. It
would be good if it would prefer the file in the current directory when
one exists. Otherwise, it's a great feature.
- Similarly, when using Cmd-T "Go to file", which I use almost
exclusively to open up new files now, it would be great if I could
write "itemonetcl" to get item/one.tcl, as opposed to site/one.tcl.
Currently, it doesn't take the path into account at all.
I can see some downsides to changing current behavior, too,
particularly with the Go to file feature.
But let me know what you think.
/Lars
As I set up Reformat Comment commands for the languages I use most
frequently (LaTeX and R), it occurred to me that maybe there's a way
to make a single call to rubywrap more generic, so that we don't need
a command per bundle. This is the result:
#!/usr/bin/env ruby
$LOAD_PATH << "#{ENV["TM_SUPPORT_PATH"]}/lib"
require "escape"
scope = ENV["TM_SCOPE"]
case scope
when /comment\.(block|line)\.number-sign\./
cstring = "# "
when /comment\.(block|line)\.percentage\./
cstring = "% "
end
flags = ""
flags += " -p \"#{cstring}\" "
flags += " --retabify" if ENV["TM_SOFT_TABS"] == "NO"
text =`echo -n "#{e_as(STDIN.read).gsub(/[$`]/, '\\\\\0')}" | ruby "#
{ENV["TM_SUPPORT_PATH"]}/bin/rubywrap.rb" #{flags}`
print e_sn(text)
The parameters are the same as the current command, with the
exception of scope, which I set to "comment.line, comment.block".
I also added a gsub to the command because it was eating latex math
and R symbols ($). There's probably a better solution to that. This
seems to work for me, and should be extended easily by adding lines
to the case statement for other languages. One advantage is that by
specifying the comment character based on the scope, it ought to work
for anything; it catches comments for both bash and perl, for
instance, without any extra effort. I think it's kind of cool.
-Alan
Hello,
I am working a lot with source code written using Emacs on Linux. The
prevailing convention is that tabs are presented as 8 spaces, but
indents are only 4 spaces. Indenting will insert spaces, and Emacs
seems to swap groups of 8 spaces for a tab.
If I use a tab size of 8 in Textmate, the source files display
correctly. Sadly, there is no way to tell Textmate to use an indent
size of 4.
It would be very useful is it was possible to tell TextMate to:
1. Draw tabs as 8 spaces
2. Use spaces when indenting
3. Intend with 4 spaces, not the 8 spaces from a tab
Is there any way to do this with TextMate at the moment?
I'm using TextMate 1.5.3 (1215)
--
Kind regards,
James Milne
Hi,
Mail has this thing where by when you are typing and you are not sure
of the spelling of the word (or even if such a word exists) you
can press <esc> before yo complete the word & it gives you a pull
down of various choices. Is this something that can be incorporated
in the text scope of textmate?
(note: i know of ctr-apple-D which can check for the word in
dictionary but that is not the functionality I need in this case -
ie, since that assumes you already know how to spell the word...)
Thanks
danstan
ps; interestingly the Mail functionality doesnt seem to work within
a sentence.
Hi,
I've stumbled on a problem with TextMate's python handling which goes
into an infinite loop (or a really long computation) during certain
circumstances. When this happens, TextMate doesn't react to any input
anymore, which causes dataloss of everything typed after the last save.
I have the following function (<> only shows the position of the
caret and is no text) in a python file:
def c(docstring, baseindent=0):
#from http://www.python.org/dev/peps/pep-0257/
lines = docstring.splitlines()
# Determine minimum indentation (first line doesn't count):
indent = sys.maxint
for line in lines[1:]:
stripped = line.lstrip()
if stripped:
indent = min(indent, len(line) - len(stripped))
# Remove indentation (first line is special):
trimmed = [<>lines[0].strip()]
if indent < sys.maxint:
indent -= baseindent
for line in lines[1:]:
trimmed.append(line[indent:].rstrip())
# Return a single string:
return '\n'.join(trimmed)
Now I type ]<enter> and watch TextMate die. It'd be cool if this
could be fixed.
To reproduce the problem:
1. Open TextMate
2. Paste the above function into TextMate, put your caret where <> is
(and remove <> from the text)
3. Go into python mode (shift-ctrl-opt-p 4)
4. enter ]<cr>
Bye,
Nico
I must be missing something really obvious here but I don't know how
to do this most basic thing:
(1) Drag a folder onto TM icon to open as project
(2) Open an HTML file called index.html
-- Now here's the part that throws me ---
(3) Make a new file called index2.html based on the original index.html
My first instinct is to right click on the file in the project drawer
and look for "duplicate file" or something similar - no such option
exists. So the next thing I try is opening the file and using "Save
as" to make the new file. This actually works but something weird
happens: In the drawer, it has the effect of *renaming* my original
file rather than adding a new one. If I switch to another
application and then back to TM, the original file reappears. Is
this expected behavior?
So what's the preferred method of creating a new file starting with a
copy of an existing one?
Thanks!
Sean
:::: DataFly.Net ::::
Complete Web Services
http://www.datafly.net
Hello
When I choose from the bundle Latex > Edit Configuration File
The in TextMate opening file is rather confusing. When I open this file
in Proprety List Editor ists clear, but in TextMate its rather cryptic ...
Is there something wring with my configuration, or is that normal. Also
I dont know, how to actually use this file.
Thanks
David
The macro described here has a few oddities.
http://comox.textdrive.com/pipermail/textmate/2005-October/006444.html
<quote>
1) move to beginning of line (ctrl A)
2) regexp search for: (?=\S|$)
</quote>
Lets say '#' indicates where the cursor is.
When I press Home on the following line..
@implementation App#Controller
Then the cursor is placed between '@' and 'i'.
When I press Home on the following line..
x -(IBAction)te#st:(id)sender {
Then the cursor is placed just before '-'.
Pressing home on an empty line then the cursor is
placed on the following line.
Is there a better smart-home macro?
preferable a smart-home macro that can toggle
between line-begin and text-begin.
--
Simon Strandgaard
http://opcoders.com/