Commenting/Uncommenting a block of Python code in TextWrangler
Asked Answered
D

2

12

Searched this a bit before asking. There is another thread that seems to be asking about this same issue in the IDLE editor, but I'm wondering about TextWrangler.

The manual lists "Un/Comment Selection" but in the keyboard shortcut section it doesn't seem to appear, and it's certainly not under my "Text" dropdown when I'm editing a Python file. (I briefly checked other languages and still did not see the option in the dropdown.)

Is there some way to handle this or add the feature for Python? If there is some comprehensive guide to using TextWrangler with Python (or if you want to pimp any other editor for OS X besides the tired old emacs/vim, let me know.)

Thanks

Dotdotage answered 10/7, 2011 at 19:1 Comment(0)
P
23

It's in the "Text" menu (5th entry). The command doesn't have a keyboard shortcut by default, but you should be able to add one with the system's keyboard preferences.

Exact instructions for adding block comment shortcut for TextWrangler:

  1. System Preferences
  2. Keyboard
  3. Keyboard Shortcuts
  4. Application Shortcuts
  5. +
  6. select TextWrangler from the Application drop-down
  7. enter exactly 'Un/Comment Selection' in the Menu Title field
  8. enter the shortcut you want
  9. Add

    -- There you go

Pathy answered 10/7, 2011 at 19:12 Comment(3)
#Facepalm. Thanks. This is an embarrassing addition to my history.Dotdotage
Hi omz, can you tell me where from did you get this shortcut text Un/Comment Selection?Arteriovenous
⌘/ toggles comments all languages in TextwranglerContrarily
D
11

the keyboard shortcut for "Un/Comment Selection" in Text Wrangler is ⌘/. I'm using version 4.5.2 and editing a Ruby file.

Debt answered 14/7, 2013 at 22:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.