Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'that?': 0.05; 'level,': 0.07; 'plenty': 0.07; '22,': 0.09; 'cursor': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; '"a"': 0.16; 'cc:name:python list': 0.16; 'fancy': 0.16; 'indent': 0.16; 'wrote:': 0.18; 'command': 0.22; 'select': 0.22; 'aug': 0.22; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'sort': 0.25; 'options': 0.25; 'task': 0.26; '(for': 0.26; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'mode': 0.30; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'lines': 0.31; 'that.': 0.31; 'there.': 0.32; 'another': 0.32; 'text': 0.33; 'fri,': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'there': 0.35; 'pm,': 0.38; 'simple': 0.61; 'between': 0.67; 'bottom': 0.67; '11:44': 0.84; 'again?': 0.84; 'everything.': 0.84; 'subject:Global': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WR8J8vSzn8jwbUkoNHwj4Ecl4lVMw98of/nCfUfsNyQ=; b=PPDv1Fi5fcrfXYDCMmj933XqYBKOyZ8yvYIWFdEIGxOlFRJogoOJtPoBUGIHnn9DQZ ZU0x1v/m+mKpnvq6D0wetbBUHQ/DA12vuWNRG19amUC9th+ieDvzesJvOm6FXLqNe/Hf 1zJ1p27hQw7kO2HufX1VJOa9G+MWUx2yyMTRjgjUUkCgTC/KcggYV/JzsHUCMJynanWO C8y/4MbMhxxmYmHDKAl4stz0RY6lQOfxhIbZeM2edO6hhpp1UjjYNv2JPvTf+uKTka+C sz8gvl+dwbpLyeLl/rq7VZwEpGD49yHRBz4a0hz3NOYVo/zKrTFAJ235Mf2fjFa7Yarp 6TkA== MIME-Version: 1.0 X-Received: by 10.152.28.230 with SMTP id e6mr6485203lah.62.1408735300170; Fri, 22 Aug 2014 12:21:40 -0700 (PDT) In-Reply-To: References: Date: Fri, 22 Aug 2014 12:21:40 -0700 Subject: Re: Global indent From: Dan Stromberg To: "Neil D. Cerutti" Content-Type: text/plain; charset=UTF-8 Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1408735308 news.xs4all.nl 2944 [2001:888:2000:d::a6]:44743 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76809 On Fri, Aug 22, 2014 at 11:44 AM, Neil D. Cerutti wrote: > On 8/22/2014 2:19 PM, Seymore4Head wrote: >> >> Is there a way to indent everything again? >> >> Say I have a while statement with several lines of code and I want to >> add a while outside that. That means indenting everything. Is there >> a global way to do that? > > > This sort of simple task is why fancy text editors were invented. > > I use and recommend gvim (press > in select mode using the standard python > plugin), but there are plenty of options out there. Here's another way of saying it (for vi or vim or other vi clone): 1) Go to the top of the region you want to indent. 2) Type "ma" in command mode to set a mark named "a". 3) Go to the bottom of the region you want to indent. 4) Type >'a to indent, one level, everything between the mark named "a" and the cursor HTH