Skip to content

Instantly share code, notes, and snippets.

@iynaix
Created June 24, 2012 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iynaix/2983618 to your computer and use it in GitHub Desktop.
Save iynaix/2983618 to your computer and use it in GitHub Desktop.
Mapping to insert the super() call of the current method in python
" inserts the super(<class_name>, self).<method_name>(<method_args>) for python
nnoremap <leader>ps mz?^class<CR>w"cyiw'zasuper(<C-R>c, self).<C-C>?def <CR>w"cy$gi<C-R>c<C-C>x%ldW:s/=.\{-\},/,/ge<CR>:noh<CR>$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment