Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Tim Chase Newsgroups: comp.lang.python Subject: Re: best text editor for programming Python on a Mac Date: Sun, 19 Jun 2016 21:41:48 -0500 Lines: 41 Message-ID: References: <242caeee-f489-4956-8261-680fe49f402d@googlegroups.com> <576747c1$0$1585$c3e8da3$5496439d@news.astraweb.com> <20160619214148.78c07851@bigbox.christie.dr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de lKDyY/sNAcu04gQH44iP3AbMBYAw0CJO9+brZr9gkTTQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:text': 0.04; 'subject:Python': 0.05; 'encoded': 0.05; 'character,': 0.07; 'subject:editor': 0.07; 'utf-8': 0.07; 'cursor': 0.09; 'encoding.': 0.09; 'non-ascii': 0.09; 'unicode,': 0.09; 'encoding': 0.15; 'instead.': 0.15; '-tkc': 0.16; '2016': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'hex': 0.16; 'index.': 0.16; 'ordinal': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Mac': 0.16; 'subject:programming': 0.16; 'value"': 0.16; 'wrote:': 0.16; 'byte': 0.18; 'bytes': 0.18; 'refers': 0.18; 'ascii': 0.22; 'context.': 0.22; 'am,': 0.23; 'bit': 0.23; 'header :In-Reply-To:1': 0.24; 'mon,': 0.24; 'command': 0.26; 'sense': 0.26; 'helpful': 0.27; 'sequence': 0.27; 'values': 0.28; 'character.': 0.29; 'url:wiki': 0.30; 'code': 0.30; 'somebody': 0.30; '"the': 0.32; 'point': 0.33; 'michael': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'handle': 0.34; 'unicode': 0.35; 'supports': 0.35; 'should': 0.36; 'possible': 0.36; 'development.': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'charset:us-ascii': 0.37; 'along': 0.39; 'well.': 0.40; 'to:addr:python.org': 0.40; 'show': 0.62; 'details': 0.62; 'more': 0.63; 'within': 0.64; 'god': 0.67; 'hearing': 0.67; 'received:23': 0.84 X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|tim@thechases.com X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1466390510915:3560051786 X-MC-Ingress-Time: 1466390510915 In-Reply-To: <576747c1$0$1585$c3e8da3$5496439d@news.astraweb.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) X-AuthUser: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20160619214148.78c07851@bigbox.christie.dr> X-Mailman-Original-References: <242caeee-f489-4956-8261-680fe49f402d@googlegroups.com> <576747c1$0$1585$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:110173 On 2016-06-20 11:32, Steven D'Aprano wrote: > On Mon, 20 Jun 2016 04:58 am, Michael Torrie wrote: > > > When the cursor is over character, do command "ga" and it will > > show you the hex code for that character. > > > > http://vim.wikia.com/wiki/Showing_the_ASCII_value_of_the_current_character > > /me cries > > Every time somebody refers to "the ASCII value" of non-ASCII > characters, God kills a puppy. Though to be fair, vim and Unicode both have their origins around 1987, so for one to know of the other would have taken a bit of miraculous prognostication. Despite existing since then, I don't recall hearing much about Unicode as a *common* standard until the early 2000s, so that's defensibly ~13 years of (semi-)obscurity during parallel development. The "ga" mnemonic of "[g]a=ascii value" made much more sense in the historical context. Now that Vim supports Unicode, "ga" shows the ordinal value depending on the internal encoding. If that internal encoding is UTF or UCS encoded Unicode (whether 8-bit, 16-bit, or 32-bit, big-or-little endian), then it shows the code-point. If it's a one- or two-byte encoding, vim returns that index. So the mnemonic should become "ga=ascii value or unicode code point along with possible combing/composing-character code-points". Not as helpful a mnemonic. As an aside, Vim also provides a "g8" command to show the decomposed hex bytes of a UTF-8 byte sequence if you want those values instead. Both should handle combining/composing characters as well. -tkc For more details within vim: :help ga :help g8 :help encoding-values