Need some Help? Have a tip to share?

Email me at MacTipper@gmail.com, or, leave a comment!

MacTipper Recommends Dropbox!


Dropbox is by far the most useful app I have ever had the pleasure of owning. Best of all, it's free! Check it out here!

10/22/09

Jump to Line Number in TextEdit

I do a lot of code editing in TextEdit rather than a more proper code editing application. (If you have a suggestion for a code editing application, leave a comment and I'll check it out.) Recently, I've been working with a lot of Python and Perl which report problems based on line numbers. (e.g. "Error on line 52.") This causes problems as I then need to open the script in TextEdit and hit the down key 52 times. Then, it occurred to me that TextEdit might have a line-number function built right in. As it turns out, it does! Just hit Cmd-L and type in the line-number you wish to jump to and hit return. Couldn't be easier!

2 comments:

  1. TextWrangler (shareware) may be just the ticket for what you want. From BareBones Software, I think.
    ReplyDelete
  2. Forgot to mention that TextMate has a python bundle - which when pychecker is activated allows you to run the python code directly from the editor (cmd+R) and the output will be conveniently collected in a window. If there are any error messages - the bundle will help you jump to the right line.

    The best thing for me - when trying out modules, is that I make an ifmain os.system('main file') that loads the module. Then I do not have to switch tab etc. to test my module under real conditions and furthermore the python bundle will still find the correct place where the run went wrong.

    And TextMates textsnippets can really be recommmended.

    The snippet is typically activated when you have entered a word, e.g. pickle and then pres tab.

    The really good thing is that textmate allows you to have multiple options for the same word - e.g. pickle have two options for me: dump and load, which again can be chosen by either 1/2 or selected by arrow keys.

    Furthermore textmate allows for special actions to be specified when dropping files etc. So dropping af picture file in a latex environment, will make an image environment and the picture is added as a text link to its location.

    So I can warmly recommend textmate - which besides its advanced features only present itselves with a simple textmate window.
    ReplyDelete

Note: Only a member of this blog may post a comment.

Subscribe Via Email!

Enter your email address:

Delivered by FeedBurner