Takaaki Kato devlist@samuraicoder.net wrote:
On Jul 30, 2007, at 5:28 AM, Dushan Mitrovich wrote:
- On opening ordinary text documents the Line counter at lower left shows the line number, but the column counter just shows '-'. How do I get this to work correctly?
Where do you see the `-`? The `-` in the lower right side is a symbol list. The column is just next to the `Line: xx` on the lower left. If you open a new document, you should see "Line: 1 Column: 1" (assuming you open a new document wihtout any templates.
What I see is this: "Line: 1 Column: _", followed by a pale vertical bar, followed by a pale colored disk with the white letter "L".
- How do I adjust the left margin for printing?... in fact, all the essential printing parameters?
TextMate doesn't have many features for printing. See the link below:
Oh, thanks for the info. Amazing that an otherwise competent text editor should lack such essentials. BTW, the information in the URL above differs a bit from what my copy of TextMate (1.5.6) shows: the "View Source as PDF" is in the Latex bundle rather than the Source bundle. Where's the best place to get pdfsync and pdflatex?
- Dushan
On Jul 31, 2007, at 5:26 AM, Dushan Mitrovich wrote:
Takaaki Kato devlist@samuraicoder.net wrote:
On Jul 30, 2007, at 5:28 AM, Dushan Mitrovich wrote:
- On opening ordinary text documents the Line counter at lower left shows the line number, but the column counter just shows '-'. How do I get this to work correctly?
Where do you see the `-`? The `-` in the lower right side is a symbol list. The column is just next to the `Line: xx` on the lower left. If you open a new document, you should see "Line: 1 Column: 1" (assuming you open a new document wihtout any templates.
What I see is this: "Line: 1 Column: _", followed by a pale vertical bar, followed by a pale colored disk with the white letter "L".
Not sure why that happens. I suspect different possibilities like language you use, overhand writing, freehanded writing, wrapping settings.. But I can't reproduce your issue.
- How do I adjust the left margin for printing?... in fact, all the essential printing parameters?
TextMate doesn't have many features for printing. See the link below:
Oh, thanks for the info. Amazing that an otherwise competent text editor should lack such essentials. BTW, the information in the URL above differs a bit from what my copy of TextMate (1.5.6) shows: the "View Source as PDF" is in the Latex bundle rather than the Source bundle. Where's the best place to get pdfsync and pdflatex?
I think some bundles have changed over time. I think what you have is recent. If you download every bundle update via subversion, that's the latest. I have no experience with latex, so somebody else will hopefully chime in. Make sure that some bundles have Help in the bundle, which is not available in Help menu in the menu bar. LaTeX bundle has a very long help file.
Sorry for not being able to help you. Email to Allan, and you'll get the answer instantly :)
Takaaki
Takaaki Kato wrote:
Oh, thanks for the info. Amazing that an otherwise competent text editor should lack such essentials. BTW, the information in the URL above differs a bit from what my copy of TextMate (1.5.6) shows: the "View Source as PDF" is in the Latex bundle rather than the Source bundle. Where's the best place to get pdfsync and pdflatex?
I think some bundles have changed over time. I think what you have is recent. If you download every bundle update via subversion, that's the latest. I have no experience with latex, so somebody else will hopefully chime in. Make sure that some bundles have Help in the bundle, which is not available in Help menu in the menu bar. LaTeX bundle has a very long help file.
Gack: I don't think you want to be grabbing latex just to get some printing functionality in place! If you're interested in producing beautiful technical documents on the other hand...
The link mentioned earlier in this thread *is* out of date: the "Typeset and View (PDF)" command in the latex bundle almost certainly isn't what was being referred to: it is --unsurprisingly-- only useful on a latex source file. I do have a recollection of some printing scripts being developed using "enscript", a formatting utility that comes with OS X. Here's one that lingers in my bundle, and occasionally proves useful. Make a new command with... ======================================================================= Save: Current File Command(s): #!/bin/bash # close stderr exec 2<&- # set options here enscript_opt="-2Gr --line-numbers -o -" tempfile="/tmp/texmate-print.$$.pdf" # note: "$$" is the current pid pstopdf_opt="-i -o $tempfile" # create the pdf and open it enscript $enscript_opt | pstopdf $pstopdf_opt open $tempfile rm $tempfile
Input: Entire Document Output: Discard =======================================================================
You'll probably want to play with the enscript options to get the output to your liking, but it's very malleable.
Cheers, Paul
This is a blue-sky kind of question, not a query about TextMate features. I want to do something that's probably impossible...
As I mentioned in another thread on this list titled "opening a file readonly", I often use TextMate to view files that contain saved copies of router or switch configurations. I never change the files, but I like the power TextMate provides when reading the files which can be quite large. I wrote TextMate language grammars for the 3 kinds of configuration files that I peruse, so now I have syntax highlighting in all 3 types. Very cool!
With a little TextMate hacking I've added another benefit. When "editing" one of these files with TextMate, I can place the caret in an IP address, autonomous system number or VLAN number, hit the "help" key, and TextMate looks up and displays a tooltip window that tells me what I'm looking at. For example, if I put the caret in an IP address and hit "help", a tooltip window pops up containing the name that corresponds to the IP address. You can probably guess that this is implemented with a TextMate "command" in a bundle. The command executes a 40-line Perl script that uses gethostbyaddr or looks strings up in a file based on very simple guesses about what the search string is. This is *very* convenient when viewing configuration files.
My question is, can I push this any further? I'd like to have the same functionality when I'm logged into a device interactively. Today I access network devices through Terminal windows that run telnet or ssh sessions to the devices. I'd like to be able to place the mouse cursor over something in such a window, hit the "help" key and have the system make an attempt to tell me something useful about what I'm pointing at. Terminal.app can't do this, but TextMate can. Terminal.app can do interactive command-line sessions, but TextMate can't. But TextMate has ^R for executing the current line as a shell command, which is close...
Emacs has it. It's called "shell mode" or "eshell". An Emacs edit buffer functions something like a Terminal window that's also an edit buffer. If you move the caret (Emacs calls it "point") over any line and hit RETURN, the point is moved to the bottom of the buffer, the line is sent to the shell, and the output is appended to the buffer, including the shell's prompt. With this system, command-line history takes on a new meaning - it's not only the commands, it's all their output that is available in the edit buffer. Instead of a shell with Emacs-style command-line editing, it's an editor with command-line features. I suppose Emacs handles the ever-growing edit buffer size somehow, probably by only preserving 1000 lines or something. Emacs urban legend has it that at some universities in the 70s, beginning computer science students were give accounts that by default put them in Emacs in shell mode instead of a true shell when they logged in.
If TextMate supported this, it would be an invaluable aid when I'm working on network devices. It could probably be used in similar scenarios to give TextMate users their own dynamic help for various command-line interfaces.
-- Pete
When you make a new thread,
Do not: Press reply button (Command-R) and change the Subject. Please do: use the email link that appears at the end of every email.
Using reply button (Command-R) contains information (in the header) used in the old thread, so it destroys a threading/folding system in some email clients including Apple Mail (or Mail.app).
Regards,
Takaaki
On Jul 31, 2007, at 7:02 AM, Pete Siemsen wrote:
This is a blue-sky kind of question, not a query about TextMate features. I want to do something that's probably impossible...
Sorry about that, I'll do it correctly next time.
-- Pete
On Jul 30, 2007, at 4:10 PM, Takaaki Kato wrote:
When you make a new thread,
Do not: Press reply button (Command-R) and change the Subject. Please do: use the email link that appears at the end of every email.
Using reply button (Command-R) contains information (in the header) used in the old thread, so it destroys a threading/folding system in some email clients including Apple Mail (or Mail.app).
Regards,
Takaaki
On Jul 31, 2007, at 7:02 AM, Pete Siemsen wrote:
This is a blue-sky kind of question, not a query about TextMate features. I want to do something that's probably impossible...
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 31. Jul 2007, at 00:02, Pete Siemsen wrote:
[...] I can place the caret in an IP address, autonomous system number or VLAN number, hit the "help" key, and TextMate looks up and displays a tooltip window that tells me what I'm looking at [...] I'd like to have the same functionality when I'm logged into a device interactively.
Not as convenient as customizing TextMate, but OS X has “services” which are actions you can run on the selection in basically every application. ThisService [1] is a way to write such services in a scripting language. So in practice you might be able to write a service for this IP address look-up which can be used in Terminal.
[1]: http://wafflesoftware.net/thisservice/
[...] If TextMate supported this, it would be an invaluable aid when I'm working on network devices. It could probably be used in similar scenarios to give TextMate users their own dynamic help for various command-line interfaces.
The main problem with creating such mode is that there are like 30 years of legacy stuff involved when creating a terminal emulator. I.e. this would be a serious drain on my resources, alone fully understanding all this tty stuff is beyond my current capabilities.
My secret plan is to open up more of TextMate’s internal API (in 2.x) and hopefully then someone else can create a terminal mode / port an existing terminal to use TextMate as back-end or similar.
On Jul 30, 2007, at 10:05 PM, Allan Odgaard wrote:
The main problem with creating such mode is that there are like 30 years of legacy stuff involved when creating a terminal emulator. I.e. this would be a serious drain on my resources, alone fully understanding all this tty stuff is beyond my current capabilities.
FWIW, "M-x shell" doesn't give you a proper terminal -- it only emulates a dumb terminal which is good enough for the times that you want a shell inside your editor. Not sure how much that simplifies things, but at least it means you don't need to understand vt100 (much less xterm control sequences).
My secret plan is to open up more of TextMate’s internal API (in 2.x) and hopefully then someone else can create a terminal mode / port an existing terminal to use TextMate as back-end or similar.
Integration w/CocoaTechTerminal would be interesting. :-)
j.
Now that I would call feature creep! Count me out for that kind of bloat. And as someone brought up CocoaTech: I'd be PathFinder's biggest fan if it were not so terribly bloated. My favorite Apps do one thing, but they do that thing right. And they integrate/cooperate nicely with others to become more than the sum of it's parts. Bloated want-to-do-all apps usually become for less than the sum of it's parts...
Just MHO.
Gerd
Allan,
Thanks! I downloaded ThisService and used it to define my own service, a Perl script that translates IP addresses. Works in Terminal, but the output went right into the Terminal instead of appearing as a tooltip. So I tried PerlTk to open a small text window to display the result, but PerlTk requires that X11 be running. So I rewrote it in Ruby and used Tk in Ruby. It works!
My only gripe is that that the window opens somewhere on the screen other than next to the cursor. I realize that I'm far afield from TextMate here, but can you suggest another approach that would open a tooltip window next to the cursor, as TextMate does?
-- Pete
On Jul 30, 2007, at 7:58 PM, Allan Odgaard wrote:
On 31. Jul 2007, at 00:02, Pete Siemsen wrote:
[...] I can place the caret in an IP address, autonomous system number or VLAN number, hit the "help" key, and TextMate looks up and displays a tooltip window that tells me what I'm looking at [...] I'd like to have the same functionality when I'm logged into a device interactively.
Not as convenient as customizing TextMate, but OS X has “services” which are actions you can run on the selection in basically every application. ThisService [1] is a way to write such services in a scripting language. So in practice you might be able to write a service for this IP address look-up which can be used in Terminal.
On 2. Aug 2007, at 17:55, Pete Siemsen wrote:
[...] My only gripe is that that the window opens somewhere on the screen other than next to the cursor. I realize that I'm far afield from TextMate here, but can you suggest another approach that would open a tooltip window next to the cursor, as TextMate does?
The closest you can get is likely by using AppleScript and ask Terminal for the dimensions of the first window. That will give you at least the rectangle of the active window.
On 30. Jul 2007, at 22:26, Dushan Mitrovich wrote:
Where do you see the `-`? The `-` in the lower right side is a symbol list. The column is just next to the `Line: xx` on the lower left. If you open a new document, you should see "Line: 1 Column: 1" (assuming you open a new document wihtout any templates.
What I see is this: "Line: 1 Column: _", followed by a pale vertical bar, followed by a pale colored disk with the white letter "L".
And this is even when you place the caret in the upper left corner, i.e. at column one?
Here’s how it should look:
- How do I adjust the left margin for printing?... in fact, all the essential printing parameters?
TextMate doesn't have many features for printing. See the link below:
Oh, thanks for the info. Amazing that an otherwise competent text editor should lack such essentials. BTW, the information in the URL above differs a bit from what my copy of TextMate (1.5.6) shows: the "View Source as PDF" is in the Latex bundle rather than the Source bundle. Where's the best place to get pdfsync and pdflatex?
I’ll update the manual. This command is gone. But there is a “Create HTML From Document” which you can run, Show Web Preview (Window menu) and then print from there.
If you do this a lot, you can go to the bundle editor and change the output for the command to Show as HTML and give it a key equivalent. Then printing (colored) is just two keys instead of one.