Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have tried to copy/paste my code into my code editor on my MAC. However, it auto indents everything. Is there a way to un-indent multiple lines at once?

share|improve this question

migrated from Oct 12 '12 at 21:44

This question came from our site for professional and enthusiast programmers.

what is your editor? – Marcus Oct 12 '12 at 6:47
This is not a programming question according to the FAQ. You should ask this on SuperUser (or read the manual of your editor), because it's not Python, it's your editor that does the indenting. – Tim Pietzcker Oct 12 '12 at 6:56

3 Answers 3

This really depends on what's the editor you are using. If it's vi/vim, just type :set paste before pasting the code.

share|improve this answer
I'm using CodeRunner. – user1740280 Oct 12 '12 at 7:07

If you are using python IDLE just ctrl+H-> check Regular expression ->Enter ^\t -> Replace All .... done :).

share|improve this answer
This will mess up indentation everywhere else in the file... – Tim Pietzcker Oct 12 '12 at 7:04
@TimPietzcker:- This is weird, try using find and it shows starting indents but at replace all its removing everything...some sort of bug... – perilbrain Oct 12 '12 at 7:06
Is this IDE the one hat comes with macPython? Right now, I'm using an app called CodeRunner – user1740280 Oct 12 '12 at 7:07

Try command+[ or command+] after you've selected the lines That at least works for me in IDLE.

share|improve this answer
What is the IDLE? The one that comes with MacPython? – user1740280 Oct 12 '12 at 7:09
IDLE is one of the editors. Does that command+[ trick not work in your current editor? – Atticus29 Oct 12 '12 at 7:12
Hmm, It just worked in my current editor, instead of Ctrl-c I used the copy function on pastebin, but I'm gonna use the other IDLE. Does it come with pygame? – user1740280 Oct 12 '12 at 7:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.