Skip to content

Commit

Permalink
Don't report too many errors when vim doesn't support python
Browse files Browse the repository at this point in the history
  • Loading branch information
WangNan0 authored and trefis committed Dec 12, 2017
1 parent 0dcaeb9 commit df24600
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion autoload/coquille.vim
Expand Up @@ -5,10 +5,22 @@ if !exists('coquille_auto_move')
let g:coquille_auto_move="false"
endif

try
py import sys, vim
catch /E319:/
if !exists('s:warned')
echo "vim doesn't support python. Turn off coquille"
let s:warned = 1
endif
function! coquille#Register()
endfunction
finish
endtry


" Load vimbufsync if not already done
call vimbufsync#init()

py import sys, vim
py if not vim.eval("s:current_dir") in sys.path:
\ sys.path.append(vim.eval("s:current_dir"))
py import coquille
Expand Down

0 comments on commit df24600

Please sign in to comment.