Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76878
| From | Christian Gollwitzer <auriocus@gmx.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Global indent |
| Date | 2014-08-23 18:17 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <ltaerg$ihl$1@dont-email.me> (permalink) |
| References | (2 earlier) <20140822125414.1fe9eb5c@rg.highlandtechnology.com> <87oavc9tde.fsf@elektro.pacujo.net> <53f859fb$0$29983$c3e8da3$5496439d@news.astraweb.com> <lt9nl3$gkh$1@dont-email.me> <mailman.13343.1408803618.18130.python-list@python.org> |
Am 23.08.14 16:19, schrieb Joshua Landau:
> (Since this is already an editor war...)
>
> On 23 August 2014 10:41, Christian Gollwitzer <auriocus@gmx.de> 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.
I never looked into Sublime, because it costs money. But no doubt it is
a powerful editor, judging from comments of other people.
>
> 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
> [ ... some keystrokes ...]
>
> Ctrl-Shift-q to repeat macro
>
> Compare with Vim:
> http://stackoverflow.com/questions/4224410/macro-for-making-numbered-lists-in-vim
>
I'd actually do this in gvim to put numbers at each line:
- Select text (by mouse, or v + cursor movements)
- ! awk '{print NR ". " $0}'
Yes, it is cheating, it pipes the selected text through an external
tool. But why should I do the tedious exercise of constructing an editor
macro, when an external tool like awk can do the same so much easier?
Christian
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Global indent Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-22 14:19 -0400
Re: Global indent Skip Montanaro <skip@pobox.com> - 2014-08-22 13:34 -0500
Re: Global indent "Neil D. Cerutti" <neilc@norwich.edu> - 2014-08-22 14:44 -0400
Re: Global indent Dan Stromberg <drsalists@gmail.com> - 2014-08-22 12:21 -0700
Re: Global indent Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-22 15:46 -0400
Re: Global indent Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-08-22 12:54 -0700
Re: Global indent Marko Rauhamaa <marko@pacujo.net> - 2014-08-22 23:11 +0300
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 19:08 +1000
Re: Global indent Marko Rauhamaa <marko@pacujo.net> - 2014-08-23 12:32 +0300
Re: Global indent Christian Gollwitzer <auriocus@gmx.de> - 2014-08-23 11:41 +0200
Re: Global indent Joshua Landau <joshua@landau.ws> - 2014-08-23 15:19 +0100
Re: Global indent Christian Gollwitzer <auriocus@gmx.de> - 2014-08-23 18:17 +0200
Re: Global indent Joshua Landau <joshua@landau.ws> - 2014-08-23 21:57 +0100
Re: Global indent Rustom Mody <rustompmody@gmail.com> - 2014-08-23 14:55 -0700
Re: Global indent Joshua Landau <joshua@landau.ws> - 2014-08-24 20:24 +0100
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-24 00:56 +1000
Re: Global indent Christian Gollwitzer <auriocus@gmx.de> - 2014-08-23 18:09 +0200
Re: Global indent Anders Wegge Keller <wegge@wegge.dk> - 2014-08-23 22:43 +0200
Re: Global indent Marko Rauhamaa <marko@pacujo.net> - 2014-08-24 01:50 +0300
Re: Global indent Tim Chase <python.list@tim.thechases.com> - 2014-08-23 15:18 -0500
Re: Global indent Rustom Mody <rustompmody@gmail.com> - 2014-08-23 07:49 -0700
Re: Global indent [levity] Peter Pearson <pkpearson@nowhere.invalid> - 2014-08-23 17:17 +0000
Re: Global indent "Neil D. Cerutti" <neilc@norwich.edu> - 2014-08-22 16:16 -0400
Re: Global indent Dan Stromberg <drsalists@gmail.com> - 2014-08-22 14:14 -0700
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 19:31 +1000
Re: Global indent Tim Chase <python.list@tim.thechases.com> - 2014-08-23 15:09 -0500
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 18:19 +1000
Re: Global indent alister <alister.nospam.ware@ntlworld.com> - 2014-08-23 10:17 +0000
Re: Global indent Gene Heskett <gheskett@wdtv.com> - 2014-08-23 10:32 -0400
Re: Global indent Chris Angelico <rosuav@gmail.com> - 2014-08-23 06:20 +1000
Re: Global indent Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-22 21:59 +0100
Re: Global indent mm0fmf <none@mailinator.com> - 2014-08-23 12:50 +0100
Re: Global indent Simon Ward <simon@bleah.co.uk> - 2014-08-22 20:22 +0100
Re: Global indent Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-23 18:12 +1000
Re: Global indent Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-23 11:10 -0400
csiph-web