Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35881

Re: New to python, do I need an IDE or is vim still good enough?

Date 2013-01-01 21:12 +1100
From Cameron Simpson <cs@zip.com.au>
Subject Re: New to python, do I need an IDE or is vim still good enough?
References <50e25c10$0$30003$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.1511.1357035188.29569.python-list@python.org> (permalink)

Show all headers | View raw


On 01Jan2013 03:46, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
| On Sat, 29 Dec 2012 14:00:23 -0500, Mitya Sirenef wrote:
| > [...] For instance, if I need to change
| > a block inside parens, I type ci) (stands for change inside parens),
| > while with a regular editor I'd have to do it manually and by the time
| > I'm done, I'd forget the bigger picture of what I'm doing with the code.
| 
| See, by the time I remembered what obscure (to me) command to type, or 
| searched the help files and the Internet, I'd have forgotten what the 
| hell it was I was trying to do.

Well, the idea is that your fingers become familiar with the core
commands. An issue of practice. The more complex vi commands are usually
composed from smaller pieces, so the learning curve isn't as steep as it
initially appears. Eg "%" jumps to that matching bracket. And
_therefore_, "c%" changes all text from here to the matching bracket.
There's a whole host of these.

| With a GUI app, I can run the mouse over the menus and see a high-level 
| overview of everything the app can do in a matter of a second or two. 

Well, there is GVim, a GNome X11 interface to vim. I imagine it would
offer that kind of mode.

| (Perhaps three or five seconds if the app over-uses hierarchical menus.) 
| But with a text interface, commands are much less discoverable. I can 
| also use *spacial* memory to zero in on commands much more easily than 
| verbal memory -- I have no idea whether the command I want is called 
| "Spam" or "Ham" or "Tinned Bully Beef", but I know it's in the top 
| quarter of the "Lunch" menu, and I will recognise it when I see it.

I must admit I find Apple's "help" search box neat this way - you can
type a keyword is it will actually find the menu item for you. Not that
I use this for vi, of course...

| > Another example: >ap stands for "indent a paragraph (separated by blank
| > lines)". And there are many dozens if not hundreds such commands that
| > let you stay focused on the logic of your code.
| 
| Ah yes, the famous "a for indent" mnemonic. *wink*

No, ">" is indent: it means shift-right. For Python you'd set the
shiftwidth to 4 (well, I use 2). But again, that's a grammar. Like the
"change" example above it is ">" followed by a cursor motion. So I'm
quite fond of ">}". "}" means jump to next blank line (or end of
paragraph for a prose paradigm). So ">}" means shift right from here to the
next blank line.

When your fingers know the cursor motion commands, folding any of them
into a compound command like "c" or ">" or "<" (guess what that one is)
requires almost no though. It's almost like speaking - you don't think
about grammar in your native language.

| It seems to me, that by the time I would have searched for the right 
| command to use, decided which of the (multiple) matching commands is the 
| right one, then used the command, it would have been quicker and less 
| distracting to have just done the editing by hand. But now I'm just 
| repeating myself.

To repeat yourself in "vi" you just type ".". See? So much faster than
your paragraph above:-)

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

As your attorney, it is my duty to inform you that it is not important that
you understand what I'm doing or why you're paying me so much money. What's
important is that you continue to do so.
        - Hunter S. Thompson's Samoan Attorney

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

New to python, do I need an IDE or is vim still good enough? mogul <morten.guldager@gmail.com> - 2012-12-27 12:01 -0800
  Re: New to python, do I need an IDE or is vim still good enough? ian douglas <ian.douglas@iandouglas.com> - 2012-12-27 12:13 -0800
  Re: New to python, do I need an IDE or is vim still good enough? Daniel Fetchinson <fetchinson@googlemail.com> - 2012-12-27 21:16 +0100
  Re: New to python, do I need an IDE or is vim still good enough? Alister <alister.ware@ntlworld.com> - 2012-12-27 20:23 +0000
  Re: New to python, do I need an IDE or is vim still good enough? peter <pjmakey2@gmail.com> - 2012-12-27 17:14 -0300
  Re: New to python, do I need an IDE or is vim still good enough? Terry Reedy <tjreedy@udel.edu> - 2012-12-27 15:57 -0500
  Re: New to python, do I need an IDE or is vim still good enough? Walter Hurry <walterhurry@lavabit.com> - 2012-12-27 21:16 +0000
  Re: New to python, do I need an IDE or is vim still good enough? Tim Chase <python.list@tim.thechases.com> - 2012-12-27 15:25 -0600
  Re: New to python, do I need an IDE or is vim still good enough? Michael Torrie <torriem@gmail.com> - 2012-12-27 14:28 -0700
  Re: New to python, do I need an IDE or is vim still good enough? Michael Torrie <torriem@gmail.com> - 2012-12-27 14:29 -0700
  Re: New to python, do I need an IDE or is vim still good enough? Modulok <modulok@gmail.com> - 2012-12-27 16:30 -0700
  Re: New to python, do I need an IDE or is vim still good enough? Cameron Simpson <cs@zip.com.au> - 2012-12-28 10:37 +1100
  Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-28 10:41 +1100
  Re: New to python, do I need an IDE or is vim still good enough? "TommyVee" <xxxxxxxx@xxxxxx.xxx> - 2012-12-27 20:09 -0500
    Re: New to python, do I need an IDE or is vim still good enough? Roy Smith <roy@panix.com> - 2012-12-27 20:37 -0500
  Re: New to python, do I need an IDE or is vim still good enough? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-12-28 04:15 +0000
  Re: New to python, do I need an IDE or is vim still good enough? Jamie Paul Griffin <jamie@kode5.net> - 2012-12-28 06:51 +0000
  Re: New to python, do I need an IDE or is vim still good enough? Yuvraj Sharma <aleastech@gmail.com> - 2012-12-28 01:37 -0800
    Re: New to python, do I need an IDE or is vim still good enough? Jamie Paul Griffin <jamie@kode5.net> - 2012-12-30 14:15 +0000
      Re: New to python, do I need an IDE or is vim still good enough? Neil Cerutti <neilc@norwich.edu> - 2013-01-02 18:36 +0000
        Re: New to python, do I need an IDE or is vim still good enough? Matty Sarro <msarro@gmail.com> - 2013-01-02 13:47 -0500
  Re: New to python, do I need an IDE or is vim still good enough? Andrew Berg <bahamutzero8825@gmail.com> - 2012-12-28 03:52 -0600
  Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-28 21:05 +1100
  Re: New to python, do I need an IDE or is vim still good enough? Kwpolska <kwpolska@gmail.com> - 2012-12-28 11:27 +0100
  Re: New to python, do I need an IDE or is vim still good enough? gst <g.starck@gmail.com> - 2012-12-28 04:08 -0800
  Re: New to python, do I need an IDE or is vim still good enough? python培训 <51mmj.com@gmail.com> - 2012-12-28 06:15 -0800
  Re: New to python, do I need an IDE or is vim still good enough? Westley Martínez <anikom15@gmail.com> - 2012-12-28 18:02 -0800
  Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-29 17:40 +1100
  Re: New to python, do I need an IDE or is vim still good enough? Monte Milanuk <memilanuk@gmail.com> - 2012-12-29 09:44 -0800
  Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-30 05:07 +1100
    Re: New to python, do I need an IDE or is vim still good enough? Roy Smith <roy@panix.com> - 2012-12-29 14:52 -0500
      Re: New to python, do I need an IDE or is vim still good enough? Monte Milanuk <memilanuk@gmail.com> - 2012-12-29 12:51 -0800
      Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-30 08:21 +1100
        Re: New to python, do I need an IDE or is vim still good enough? Roy Smith <roy@panix.com> - 2012-12-29 16:52 -0500
          Re: New to python, do I need an IDE or is vim still good enough? Mitya Sirenef <msirenef@lightbird.net> - 2012-12-29 17:10 -0500
          Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-30 09:30 +1100
            Re: New to python, do I need an IDE or is vim still good enough? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-01 03:55 +0000
              Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2013-01-01 15:20 +1100
          Re: New to python, do I need an IDE or is vim still good enough? Mitya Sirenef <msirenef@lightbird.net> - 2012-12-29 17:40 -0500
          Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-30 10:16 +1100
      Re: New to python, do I need an IDE or is vim still good enough? Neil Cerutti <neilc@norwich.edu> - 2013-01-02 18:43 +0000
  Re: New to python, do I need an IDE or is vim still good enough? Grant Edwards <invalid@invalid.invalid> - 2012-12-29 18:50 +0000
    Re: New to python, do I need an IDE or is vim still good enough? Tim Johnson <tim@akwebsoft.com> - 2012-12-29 15:38 -0900
    Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2012-12-30 11:54 +1100
  Re: New to python, do I need an IDE or is vim still good enough? Mitya Sirenef <msirenef@lightbird.net> - 2012-12-29 14:00 -0500
    Re: New to python, do I need an IDE or is vim still good enough? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-01 03:46 +0000
      Re: New to python, do I need an IDE or is vim still good enough? Cameron Simpson <cs@zip.com.au> - 2013-01-01 21:12 +1100
      Re: New to python, do I need an IDE or is vim still good enough? Tim Chase <python.list@tim.thechases.com> - 2013-01-01 08:23 -0600
      Re: New to python, do I need an IDE or is vim still good enough? Mitya Sirenef <msirenef@lightbird.net> - 2013-01-01 13:43 -0500
        Re: New to python, do I need an IDE or is vim still good enough? Roy Smith <roy@panix.com> - 2013-01-01 14:02 -0500
          Re: New to python, do I need an IDE or is vim still good enough? Mitya Sirenef <msirenef@lightbird.net> - 2013-01-01 14:32 -0500
          Re: New to python, do I need an IDE or is vim still good enough? Wayne Werner <wayne@waynewerner.com> - 2013-01-02 21:17 -0600
          Re: New to python, do I need an IDE or is vim still good enough? Mitya Sirenef <msirenef@lightbird.net> - 2013-01-02 22:48 -0500
      Re: New to python, do I need an IDE or is vim still good enough? Michael Torrie <torriem@gmail.com> - 2013-01-02 14:33 -0700
      Re: New to python, do I need an IDE or is vim still good enough? Mitya Sirenef <msirenef@lightbird.net> - 2013-01-02 17:48 -0500
      Re: New to python, do I need an IDE or is vim still good enough? Wayne Werner <wayne@waynewerner.com> - 2013-01-02 20:37 -0600
      Re: New to python, do I need an IDE or is vim still good enough? Gisle Vanem <gvanem@broadpark.no> - 2013-01-03 10:59 +0100
  Re: New to python, do I need an IDE or is vim still good enough? Adam Tauno Williams <awilliam@whitemice.org> - 2012-12-31 06:57 -0500
    Re: New to python, do I need an IDE or is vim still good enough? Hans Mulder <hansmu@xs4all.nl> - 2012-12-31 13:35 +0100
      Re: New to python, do I need an IDE or is vim still good enough? Ben Finney <ben+python@benfinney.id.au> - 2013-01-01 09:46 +1100
        Re: New to python, do I need an IDE or is vim still good enough? Anssi Saari <as@sci.fi> - 2013-01-04 09:34 +0200
          Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2013-01-05 02:34 +1100
          Re: New to python, do I need an IDE or is vim still good enough? Tim Chase <python.list@tim.thechases.com> - 2013-01-04 10:59 -0600
      Re: New to python, do I need an IDE or is vim still good enough? Chris Angelico <rosuav@gmail.com> - 2013-01-01 09:54 +1100
      Re: New to python, do I need an IDE or is vim still good enough? xDog Walker <thudfoo@gmail.com> - 2012-12-31 16:13 -0800
  Re: New to python, do I need an IDE or is vim still good enough? jussij@zeusedit.com - 2013-01-01 16:12 -0800
  Re: New to python, do I need an IDE or is vim still good enough? Ramchandra Apte <maniandram01@gmail.com> - 2013-01-01 21:10 -0800
    Re: New to python, do I need an IDE or is vim still good enough? Wayne Werner <wayne@waynewerner.com> - 2013-01-02 21:20 -0600
  Re: New to python, do I need an IDE or is vim still good enough? jrodkeyjr@gmail.com - 2013-01-04 08:28 -0800

csiph-web