[Python-Dev] PEP 263 -- Python Source Code Encoding (original) (raw)
M.-A. Lemburg mal@lemburg.com
Wed, 27 Feb 2002 18:44:09 +0100
- Previous message: [Python-Dev] PEP 263 -- Python Source Code Encoding
- Next message: [Python-Dev] PEP 263 -- Python Source Code Encoding
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jeff Epler wrote:
This actually works in vim with "charset plugin": let s:pep263='coding[:=]\s*([-A-Za-z0-9]+)' au BufReadPost *.py call ReloadWhenCharsetSet(1, s:pep263) au BufReadPost *.py call ReloadWhenCharsetSet(2, s:pep263) It searches for a RE compatible with PEP263 in the first and second lines. You could change the pattern from *.py to * if you want to recognize the emacs-style coding in all files.
Great ! So we can say that the RE fits vim and emacs, right ?
-- Marc-Andre Lemburg CEO eGenix.com Software GmbH
Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
- Previous message: [Python-Dev] PEP 263 -- Python Source Code Encoding
- Next message: [Python-Dev] PEP 263 -- Python Source Code Encoding
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]