Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7984837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:23:46+00:00 2026-06-04T11:23:46+00:00

I often want to find uncommented print statements in my (Python) file. I have

  • 0

I often want to find uncommented print statements in my (Python) file. I have a simple regex ^\s*print that does the job. Is there a way to assign this to a keyboard shortcut so it will Find the next uncommented print, without me having to enter the regex?

My first thought was to create a command that will find it, but I don’t have a way to move the cursor to the line once I find it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:23:48+00:00Added an answer on June 4, 2026 at 11:23 am

    You can use the Macro feature inside TextMate:

    1. Go to Bundles > Macros > Start Recording (⌥⌘M)
    2. Perform a single find command with your regex
    3. Go to Bundles > Macros > Stop Recording (⌥⌘M)
    4. Go to Bundles > Macros > Save Last Recording (⌃⌘M)
    5. Save your macro with a suitable name and keyboard shortcut into which ever bundle you like. A nice idea would be to save it into the default Python Bundle, so that the keyboard shortcut is only available when you have a Python file open.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find the following scenario quite often: You have a string that you want
When I load data in my code-behind, I find that often I want to
I usually write python in emacs. I'll often want to re-evaluate my file, which
I want to find most often seen string in a huge log file. Can
I often find that I want an element to adjust its width to the
I often find myself remembering the name of a class that I want to
I often find that in writing tests for a method I want to throw
I type <%= often enough in rails that I want to find a shortcut
Every so often I find that I have accidentally broken data binding in my
I often want to send sample apps to friends & colleages that work with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.