A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-February/020472.html below:

[Python-Dev] PEP 263 -- Python Source Code Encoding

[Python-Dev] PEP 263 -- Python Source Code Encoding [Python-Dev] PEP 263 -- Python Source Code EncodingJeff Epler jepler@unpythonic.dhs.org
Wed, 27 Feb 2002 11:32:50 -0600
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.

Jeff



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4