Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.45 KB

README.markdown

File metadata and controls

51 lines (33 loc) · 1.45 KB

selfdot.vim

Vim plugin that lets you type self. by pressing . in Python files.

Typing self. can be annoying, mistyping -- even more. This plugin lets you save keystrokes by expanding . into self. in places where putting a dot is usually a syntax error (e.g. right after if). selfdot recognizes conditionals, operators, line continuations, etc. It tries not to get in your way and is disabled inside strings and comments (so you can type cd .. and stay sane). Code-awareness relies heavily on syntax item names defined in default Python syntax file, so if you're using something else, selfdot might not work.

Installation

In a Nutshell

Put selfdot.vim in ~/.vim/ftplugin/python and be sure to have :filetype plugin on.

With Bare Hands

mkdir -p ~/.vim/ftplugin/python
cd !$
curl -O https://raw.github.com/narfdotpl/selfdot.vim/master/ftplugin/python/selfdot.vim

With Pathogen and Git

You know what to do.

Meta

selfdot.vim is written by Maciej Konieczny. This software is released into the public domain and uses semantic versioning for release numbering.