Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!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.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'insert': 0.05; 'duplicate': 0.07; 'lines,': 0.07; '101': 0.09; '[1,': 0.09; 'formatting': 0.09; 'repeated': 0.09; "they've": 0.09; 'python': 0.11; '(also': 0.16; 'evaluating': 0.16; 'ignoring': 0.16; 'increment': 0.16; 'numbered': 0.16; 'extensions': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'bit': 0.19; "python's": 0.19; 'seems': 0.21; 'command': 0.22; 'select': 0.22; 'creating': 0.23; 'replace': 0.24; 'compare': 0.26; 'nearly': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; 'lines': 0.31; '(since': 0.31; 'lists': 0.32; 'selection': 0.32; 'text': 0.33; 'beginning': 0.33; 'to:name :python-list': 0.33; 'editor': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'i.e.': 0.36; 'done': 0.36; 'next': 0.36; 'effort': 0.37; 'example,': 0.37; 'list': 0.37; 'christian': 0.38; 'sometimes': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'users': 0.40; 'blank': 0.60; 'truly': 0.60; 'august': 0.61; 'new': 0.61; 'numbers': 0.61; 'simple': 0.61; 'times': 0.62; 'more': 0.64; 'total': 0.65; 'finish': 0.65; 'repeat': 0.74; 'special': 0.74; '100': 0.79; 'keystrokes': 0.84; 'now)': 0.84; 'presumably': 0.84; 'sublime': 0.84; 'subject:Global': 0.91; 'colleagues': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=dxwDcLL1iSmDjVqlXoxMoQBSSNFSe/8WPhR81DEfx8M=; b=UaU3OUSJzNAkxv1I0qhe3/rZYeCLDmyXsnX3rY24uSZ+97M4QENv773Zoo7yari0o7 NlBRpfp5KNLqGQyJJv4htKL7IM88DEjcUh5t1BARRygqxvkXl0RdJBN72kGf2ParUzXz sUcx+lZyGqD59W5bD5j/4zeN506b97YI4LEJ2bvWyTilISZpij8kC0npOX8HeZtBCZCQ 3qFLBey8XO4G0pR0HBkhEvFZl1eIKXq1onWX9WsJ+zxIAWHgqJOPa9rOmUlPxE0H1aD2 oO15Yi0jpNSMmp+V1CPQg5eEmstlG7a7Np5G25c5q4s0CC3dfQBE7cV90tDwBa4DZ0ey zRSQ== X-Received: by 10.152.184.234 with SMTP id ex10mr10414217lac.53.1408803610226; Sat, 23 Aug 2014 07:20:10 -0700 (PDT) MIME-Version: 1.0 Sender: joshua.landau.ws@gmail.com In-Reply-To: References: <20140822125414.1fe9eb5c@rg.highlandtechnology.com> <87oavc9tde.fsf@elektro.pacujo.net> <53f859fb$0$29983$c3e8da3$5496439d@news.astraweb.com> From: Joshua Landau Date: Sat, 23 Aug 2014 15:19:30 +0100 X-Google-Sender-Auth: mdqPL2h6Rn3FwCpWeNiw8pXJlcQ Subject: Re: Global indent To: python-list Content-Type: text/plain; charset=UTF-8 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: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1408803618 news.xs4all.nl 2909 [2001:888:2000:d::a6]:38247 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76870 (Since this is already an editor war...) On 23 August 2014 10:41, Christian Gollwitzer wrote: > Sometimes I impress my colleagues with what they call "magic", i.e. creating > special repeated lists of numbers by a few keystrokes in gvim, and that has > triggered the request from them to learn a bit of (g)vim. I have yet to be truly impressed by Vim, in that Sublime Text with a few extensions seems to do the same things just as easily. I find that Vim and Emacs users consistently underrate the powers of these editors, presumably because they've never put nearly as much effort into them as they have into their Vim or Emacs. For example, to make a numbered list in (my) Sublime Text (fully custom shortcuts ahead): Alt-1 Alt-0 Alt-0 to repeat the next command 100 times Enter to insert 100 new lines, so 101 in total Ctrl-A to select all text (can be done more fancily, but keep this simple for now) Ctrl-l to select lines (creates multiple selections), ignoring the blank end of selection $: to write some text Ctrl-Shift-Home to select to beginning of line Ctrl-e to replace $ with consecutive numbers (also supports using Python's {} with all of its formatting options) With an increment function and macros: 1: to write some text Ctrl-q to start macro recording Ctrl-d to duplicate line (and select it) Left to go to start of selection INCREMENT to increment number (emulated by evaluating "1+number" with Python [1, +, Ctrl-left, Shift-Home, Ctrl-Shift-e]) Ctrl-q to finish macro recording Alt-1 Alt-0 Alt-0 to repeat the next command 100 times Ctrl-Shift-q to repeat macro Compare with Vim: http://stackoverflow.com/questions/4224410/macro-for-making-numbered-lists-in-vim