"" FUNCTIONS function! UltiSnips_ExpandSnippet() if exists('g:SuperTabMappingForward') if g:SuperTabMappingForward == "" let SuperTabKey = "\" elseif g:SuperTabMappingBackward == "" let SuperTabKey = "\" endif endif if pumvisible() " Update snippet if completion is used, or deal with supertab if exists('SuperTabKey') call feedkeys(SuperTabKey) | return '' endif call feedkeys("\a", 'n') " Close completion menu call feedkeys("\") | return '' endif " Now, really expand something py << EOF if not UltiSnips_Manager.try_expand(): vim.command("""if exists('SuperTabKey') call feedkeys(SuperTabKey) endif """) EOF return "" endfunction function! UltiSnips_JumpBackwards() py << EOF UltiSnips_Manager.jump(True) EOF return "" endfunction function! UltiSnips_JumpForwards() py << EOF UltiSnips_Manager.jump() EOF return "" endfunction "" STARTUP CODE " Expand our path python << EOF import vim, os, sys for p in vim.eval("&runtimepath").split(','): dname = p + os.path.sep + "plugin" if os.path.exists(dname + os.path.sep + "UltiSnips"): if dname not in sys.path: sys.path.append(dname) break from UltiSnips import UltiSnips_Manager EOF " You can remap these inoremap =UltiSnips_ExpandSnippet() snoremap :call UltiSnips_ExpandSnippet() inoremap =UltiSnips_JumpBackwards() snoremap :call UltiSnips_JumpBackwards() inoremap =UltiSnips_JumpForwards() snoremap :call UltiSnips_JumpForwards() " Do not remap this. snoremap :py UltiSnips_Manager.backspace_while_selected() au CursorMovedI * py UltiSnips_Manager.cursor_moved() au InsertEnter * py UltiSnips_Manager.entered_insert_mode()