Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Michael Torrie Newsgroups: comp.lang.python Subject: Re: best text editor for programming Python on a Mac Date: Sun, 19 Jun 2016 12:58:53 -0600 Lines: 33 Message-ID: References: <242caeee-f489-4956-8261-680fe49f402d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de vP1wYdQhgBKhTxfUZ4BUigUoXGOGLWVe5/2HIAEPLBzQ== 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; 'character,': 0.07; 'encoding:': 0.07; 'subject:editor': 0.07; 'utf-8': 0.07; 'cursor': 0.09; 'editor.': 0.09; 'python.': 0.11; 'suggest': 0.15; 'missed': 0.15; 'encoding': 0.15; 'file,': 0.15; '*this*': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'hex': 0.16; 'literal,': 0.16; 'peek': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Mac': 0.16; 'subject:programming': 0.16; 'wrote:': 0.16; 'string': 0.17; 'char': 0.18; 'am,': 0.23; 'seems': 0.23; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; 'command': 0.26; 'handling': 0.27; 'fine': 0.28; 'character.': 0.29; 'ret': 0.29; 'url:wiki': 0.30; 'code': 0.30; "i'd": 0.31; 'problem': 0.33; 'surprised': 0.33; 'message-id:@gmail.com': 0.34; 'case,': 0.34; 'file': 0.34; 'handle': 0.34; 'running': 0.34; 'could': 0.35; 'text': 0.35; 'unicode': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'display': 0.37; 'received:org': 0.37; 'mac': 0.37; 'thought': 0.37; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'show': 0.62; 'yes': 0.62; 'charset:windows-1252': 0.62; 'dont': 0.64; 'useful!': 0.84 X-Virus-Scanned: amavisd-new at torriefamily.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 In-Reply-To: <242caeee-f489-4956-8261-680fe49f402d@googlegroups.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: X-Mailman-Original-References: <242caeee-f489-4956-8261-680fe49f402d@googlegroups.com> Xref: csiph.com comp.lang.python:110153 On 06/19/2016 10:20 AM, Rustom Mody wrote: > Yes the OP said he was using vim > And he could not handle a unicode encoding issue I missed that part! I somehow thought the unicode issues were coming from his use of the built-in Mac text editor. In any case, I have never had unicode problems with vim. It seems to handle them just fine for me. I've never had a problem opening a UTF-8 file, using a unicode string literal, and running it in Python. > I gave an emacs solution to the issue not because I find editor-wars engaging > but because I dont know how to do *this* with vi. > I'd be surprised if vi actually cant do these: > 1. Look under the unicode-hood to peek at what a char is -- C-u C-x = in emacs 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 > 2. Change file encoding -- C-x RET f in emacs Display current encoding: :set fileencoding Set encoding to UTF-8: :set filenecoding=utf-8 > Please do suggest vi-ways of handling this -- that would be useful!