In MacVim, I save the following code as test.py
print "Hello world! python2"
which, apparently, is wrong with python3, but after running: w to save the file, there is no error message for it. The following is the part ~ / .vimrc that deals with Syntastic:
" Syntastic "" Recommended settings set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 "" Display checker-name for that error-message let g:syntastic_aggregate_errors = 1 "" I use the brew to install flake8 let g:syntastic_python_checkers=['flake8', 'python3']
How to make Syntastic detect this type of error when running test.py in the terminal:
NingGW:Desktop ninggw$ python3 test.py File "test.py", line 1 print "Hello world! python2" ^ SyntaxError: Missing parentheses in call to 'print'
Here's what: SyntasticInfo said:
Syntastic version: 3.8.0-10 (Vim 800, Darwin, GUI) Info for filetype: python Global mode: active Filetype python is active The current file will be checked automatically Available checkers: flake8 python Currently enabled checker: flake8 Press ENTER or type command to continue
source share