Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #110124
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: best text editor for programming Python on a Mac |
| Date | 2016-06-18 20:09 -0600 |
| Message-ID | <mailman.130.1466302157.2288.python-list@python.org> (permalink) |
| References | <c7ea39d0-027e-49d0-b049-3ef17929697d@googlegroups.com> <b3fde67f-d52d-b264-7b3c-16cb44952526@gmail.com> <mailman.126.1466291230.2288.python-list@python.org> <ac656b73-cc39-412b-81ec-02795aab98f8@googlegroups.com> <e8cf3aeb-a0af-2474-78f5-b19bdb4551bb@gmail.com> |
On 06/18/2016 06:12 PM, Lawrence D’Oliveiro wrote: > Pull up any old GUI-based editor you like, for example Windows > (shudder) Notepad. If there are N characters in your file, then the > insertion point can be placed at N + 1 positions: in-between two > adjacent characters, or before the first character, or after the last > character. And this makes sense: anything you type is inserted at the > insertion point. All rational text editors (and word processors) work > this way. > > But not vi/vim. It only lets you place your cursor *on* a character, > not *in-between* characters. That’s why you need two separate > insertion commands, insert-before and insert-after. And one of those > has the interesting side effect where, if you exit insertion mode > without inserting anything, it doesn’t put you back in the same > position as before. Why? In thinking about this, I think the answer is that in olden days no one had though of using the imaginary spaces between characters as a position. So we had: 0 1 2 3 4 5 6 7 8 9 H E L L O W O R L D 10 character cells, 10 cursor positions. Hence you had 10 places you could insert before (which works well for everything but appending to the string) or 10 places to insert after. So that distinction between insert and append was logical, and still is today, depending on your background and experience. It was later on that they figured out the N+1 thing you mentioned by ignoring the character cells: 0 1 2 3 4 5 6 7 8 9 10 H E L L O W O R L D That works well for interactive editing, but it doesn't lend itself as well to scripting and working with the contents of the text cells. Indeed the text cells aren't actually addressable directly in this scheme though conventionally the number immediately before the cell is used to index the cell. This can lead to confusion. For example, if the cursor is in position 10, that's not really part of the text, but it kind of appears like it is. I like that with vim I can see immediately whether there is trailing space on a line just by jumping to the end of the line ($) which will drop the cursor on the last actual character. So I guess it's just a matter of history. Perhaps it's a bit like big endian vs little endian. Neither system is inherently better; it's just what you get used to. And arguments can be made either way.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
best text editor for programming Python on a Mac Chris <cspears2002@yahoo.com> - 2016-06-17 16:52 -0700
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-17 17:19 -0700
Re: best text editor for programming Python on a Mac Ned Batchelder <ned@nedbatchelder.com> - 2016-06-17 17:36 -0700
Re: best text editor for programming Python on a Mac wxjmfauth@gmail.com - 2016-06-20 01:39 -0700
Re: best text editor for programming Python on a Mac MRAB <python@mrabarnett.plus.com> - 2016-06-18 01:58 +0100
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-17 18:50 -0700
Re: best text editor for programming Python on a Mac Steven D'Aprano <steve@pearwood.info> - 2016-06-18 12:05 +1000
Re: best text editor for programming Python on a Mac Steven D'Aprano <steve@pearwood.info> - 2016-06-18 11:55 +1000
Re: best text editor for programming Python on a Mac Zachary Ware <zachary.ware+pylist@gmail.com> - 2016-06-17 20:59 -0500
Re: best text editor for programming Python on a Mac support@ecourierz.com - 2016-06-17 22:18 -0700
Re: best text editor for programming Python on a Mac Michael Vilain <mev94303y@yahoo.com> - 2016-06-18 00:04 -0700
Re: best text editor for programming Python on a Mac Terry Reedy <tjreedy@udel.edu> - 2016-06-18 05:09 -0400
Re: best text editor for programming Python on a Mac Marko Rauhamaa <marko@pacujo.net> - 2016-06-18 12:40 +0300
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 03:08 -0700
Re: best text editor for programming Python on a Mac Michael Vilain <mev94303y@yahoo.com> - 2016-06-18 07:12 -0700
Re: best text editor for programming Python on a Mac alister <alister.ware@ntlworld.com> - 2016-06-18 13:22 +0000
Re: best text editor for programming Python on a Mac Michael Vilain <mev94303y@yahoo.com> - 2016-06-18 07:08 -0700
Re: best text editor for programming Python on a Mac Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-06-18 16:08 -0400
Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-18 09:02 -0700
Re: best text editor for programming Python on a Mac Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-20 10:38 +1200
best text editor for programming Python on a Mac MrJean1 <MrJean1@gmail.com> - 2016-06-18 08:52 -0700
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 17:07 -0600
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 17:12 -0700
Re: best text editor for programming Python on a Mac Joel Goldstick <joel.goldstick@gmail.com> - 2016-06-18 20:26 -0400
Re: best text editor for programming Python on a Mac Pete Forman <petef4+usenet@gmail.com> - 2016-06-19 11:41 +0100
Re: best text editor for programming Python on a Mac Marko Rauhamaa <marko@pacujo.net> - 2016-06-19 15:57 +0300
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 07:19 -0600
Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-19 09:20 -0700
Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-19 20:06 +0200
Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-19 11:13 -0700
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 13:04 -0600
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 12:58 -0600
Re: best text editor for programming Python on a Mac Steven D'Aprano <steve@pearwood.info> - 2016-06-20 11:32 +1000
ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 19:07 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Steven D'Aprano <steve@pearwood.info> - 2016-06-20 13:29 +1000
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Phil Boutros <philb@philb.ca> - 2016-06-20 04:30 +0000
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 22:03 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Random832 <random832@fastmail.com> - 2016-06-20 02:04 -0400
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-20 07:00 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-20 00:57 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-20 20:24 +1000
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-20 14:23 +0000
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Steven D'Aprano <steve@pearwood.info> - 2016-06-21 01:00 +1000
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-20 08:12 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 21:36 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 21:41 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Larry Hudson <orgnut@yahoo.com> - 2016-06-21 00:40 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 11:35 +0300
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 03:46 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 16:08 +0300
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 06:56 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 07:11 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-22 19:01 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-22 19:07 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 07:29 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 21:56 +0300
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Tim Chase <python.list@tim.thechases.com> - 2016-06-21 14:42 -0500
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 23:08 +0300
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-22 00:55 -0700
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Tim Chase <python.list@tim.thechases.com> - 2016-06-22 06:09 -0500
Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Tim Chase <python.list@tim.thechases.com> - 2016-06-21 10:08 -0500
Re: best text editor for programming Python on a Mac Tim Chase <python.list@tim.thechases.com> - 2016-06-19 21:41 -0500
Re: best text editor for programming Python on a Mac Quivis <quivis@domain.invalid> - 2016-06-19 21:21 +0000
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 16:15 -0600
Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-20 09:37 +0200
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 18:50 -0600
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 19:01 -0600
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 20:09 -0600
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 19:51 -0700
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 22:54 -0600
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 22:57 -0700
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 22:56 -0600
Re: best text editor for programming Python on a Mac Tim Chase <python.list@tim.thechases.com> - 2016-06-19 06:36 -0500
Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-19 09:13 +0200
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-19 00:34 -0700
Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-19 00:47 -0700
Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-19 09:57 +0200
Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 07:23 -0600
Re: best text editor for programming Python on a Mac alister <alister.ware@ntlworld.com> - 2016-06-20 08:30 +0000
Re: best text editor for programming Python on a Mac Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-20 10:44 +1200
Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-20 00:59 -0700
Re: best text editor for programming Python on a Mac Random832 <random832@fastmail.com> - 2016-06-20 09:26 -0400
Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-20 15:36 +0200
Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-20 06:48 -0700
Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-20 16:03 +0200
best text editor for programming Python on a Mac drednot57 <dpresley@midiowa.net> - 2016-06-18 19:48 -0700
Re: best text editor for programming Python on a Mac jennifer.greeen@gmail.com - 2016-07-06 03:25 -0700
Re: best text editor for programming Python on a Mac jennifer.greeen@gmail.com - 2016-07-06 03:27 -0700
csiph-web