diff --git a/UltiSnips/python.snippets b/UltiSnips/python.snippets new file mode 100644 index 0000000..a5b0bef --- /dev/null +++ b/UltiSnips/python.snippets @@ -0,0 +1,19 @@ +snippet #py "Set the python environment." +#!/usr/bin/env python +#-*- encoding: utf-8 + +"""${1:Module documentation}""" +$0 +endsnippet + +snippet class "Starting a Python class" +class ${1:ClassName}(${2:extends}): + + """${3:Class documentation}""" + + $0 +endsnippet + +snippet lint "Start a lint-disable comment" +# pylint:disable=${0:lint code} +endsnippet diff --git a/configs/vimrc b/configs/vimrc index 2cc1875..8ef35e3 100644 --- a/configs/vimrc +++ b/configs/vimrc @@ -100,7 +100,8 @@ Plugin 'davidhalter/jedi-vim' Plugin 'pangloss/vim-javascript' " snippets -Plugin 'msanders/snipmate.vim' +" Plugin 'msanders/snipmate.vim' +Plugin 'SirVer/ultisnips' " fuzzy file open Plugin 'kien/ctrlp.vim' @@ -292,3 +293,8 @@ au FileType pinpoint setlocal colorcolumn=79 textwidth=78 " this disables the documentation/preview split autocmd FileType python setlocal completeopt-=preview let g:jedi#show_call_signatures = "0" + +" ---------------------------------------------------------------------- +" UltiSnips +" ---------------------------------------------------------------------- +let g:UltiSnipsEditSplit = "horizontal"