Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed snipmate from submodules as it was causing problems with supe…

…rtab and pydoc.
  • Loading branch information...
commit 0ffa8a3bcd94e2a93545ccca5da5ebf837f07ee8 1 parent c43c5e6
@brianmcdonnell authored
Showing with 90 additions and 6 deletions.
  1. +3 −3 .gitmodules
  2. +84 −2 _vim/snippets/python.snippets
  3. +3 −1 _vimrc
View
6 .gitmodules
@@ -4,9 +4,9 @@
[submodule "_vim/bundle/vim-pathogen"]
path = _vim/bundle/vim-pathogen
url = https://github.com/tpope/vim-pathogen.git
-[submodule "_vim/bundle/snipmate"]
- path = _vim/bundle/snipmate
- url = https://github.com/msanders/snipmate.vim.git
+#[submodule "_vim/bundle/snipmate"]
+# path = _vim/bundle/snipmate
+# url = https://github.com/msanders/snipmate.vim.git
[submodule "_vim/bundle/supertab"]
path = _vim/bundle/supertab
url = https://github.com/ervandew/supertab.git
View
86 _vim/snippets/python.snippets
@@ -1,2 +1,84 @@
-snippet pdb:
- import pdb;pdb.set_trace()
+snippet #!
+ #!/usr/bin/env python
+snippet cla
+ class ${1:ClassName}(${2:object}):
+ """${3:docstring for $1}"""
+ def __init__(self, ${4:arg}):
+ ${5:super($1, self).__init__()}
+ self.$4 = $4
+ ${6}
+snippet def
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
+ """${3:docstring for $1}"""
+ ${4:pass}
+snippet deff
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
+ ${3}
+snippet defs
+ def ${1:mname}(self, ${2:arg}):
+ ${3:pass}
+snippet docs
+ '''
+ File: ${1:`Filename('$1.py', 'foo.py')`}
+ Author: ${2:`g:snips_author`}
+ Description: ${3}
+ '''
+snippet for
+ for ${1:object} in ${2:objects}:
+ ${3:pass}
+ ${4}
+snippet from
+ from ${1:module} import ${2:name}
+ ${3}
+snippet ifmain
+ if __name__ == '__main__':
+ ${1:main()}
+snippet imp
+ import ${1:module}
+ ${2}
+snippet init
+ def __init__(self, ${1:args}):
+ ${2}
+snippet ld
+ ${1:var} = lambda ${2:vars} : ${3:action}
+snippet property
+ def ${1:foo}():
+ doc = "${2:The $1 property.}"
+ def fget(self):
+ ${3:return self._$1}
+ def fset(self, value):
+ ${4:self._$1 = value}
+snippet wh
+ while ${1:condition}:
+ ${2:# code...}
+snippet pdb
+ import pdb; pdb.set_trace()
+ ${1}
+snippet try Try/Except
+ try:
+ ${1:pass}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+snippet try Try/Except/Else
+ try:
+ ${1:pass}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+ else:
+ ${5:pass}
+snippet try Try/Except/Finally
+ try:
+ ${1:pass}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+ finally:
+ ${5:pass}
+snippet try Try/Except/Else/Finally
+ try:
+ ${1:pass}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+ else:
+ ${5:pass}
+ finally:
+ ${6:pass}
View
4 _vimrc
@@ -70,7 +70,9 @@ highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
" Map Alt-L for NerdTree
-map <A-l> <Esc>:NERDTreeToggle<CR>
+map <leader>d :NERDTreeToggle<CR>
+" map <ì> <Esc>:NERDTreeToggle<CR>
+" map <A-l> <Esc>:NERDTreeToggle<CR>
" Toggle Gundo
map <leader>g :GundoToggle<CR>
Please sign in to comment.
Something went wrong with that request. Please try again.