Skip to content

Unicode goodness for Python code by using vim's “conceal” feature

Notifications You must be signed in to change notification settings

calvin/vim-cute-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

This syntax file displays unicode characters for some Python operators and built-in functions, turning the following:

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

    def foo(e, a):
        if e in [1,2,3] and not a:
            return math.sqrt(math.pi)
        else:
            return sum([1,2,3])

into

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

    def foo(e, a):
        if e ∈ [1,2,3] ∧ ¬a:
            return √(π)
        else:
            return ∑([1,2,3])

Screenshot:

This does not – at any point – alter your source code. It simply uses Vim's "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 or use something like Pathogen (recommended).

Vim ≥ 7.3 is required.

This plug-in is very much inspired by http://github.com/Twinside/vim-haskellConceal

About

Unicode goodness for Python code by using vim's “conceal” feature

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published