Skip to content
Unicode goodness for Python code using vim's new “conceal” feature
VimL
Find file
Pull request Compare This branch is 23 commits behind ehamberg:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.markdown
python.vim

README.markdown

Use unicode characters for Python operators, turning the following:

map (lambda x: x, [1,2,3])

def foo(e, a):
    if e in [1,2,3]:
        if not a:
            return 3
    else:
        return 4

into

map (λ x: x, [1,2,3])

def foo(e, a):
    if e ∈ [1,2,3]:
        if ¬a:
            return 3
    else:
        return 4

Screenshot: http://hamberg.no/erlend/files/cute_python.png

This does not – at any point — alter your source code. It simply uses Vim's new “conceal” feature to “hide” in behind , etc. Whenever the cursor is at a line with concealed text, the text will be expanded.

To install, simply put python.vim in ~/.vim/after/syntax.

This is very much inspired by http://www.vim.org/scripts/script.php?script_id=3200.

Something went wrong with that request. Please try again.