[vim] chech if have python for indent_finder

This commit is contained in:
Mathieu Maret 2014-04-10 00:23:31 +02:00
parent ee62baba4c
commit 63f499f13c
1 changed files with 3 additions and 2 deletions

5
.vimrc
View File

@ -152,8 +152,9 @@ if has("autocmd")
" enable file type detection and do language-dependent indenting
" filetype plugin indent on
" detect indentation see http://www.freehackers.org/Indent_Finder
autocmd BufReadPost * execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output "' . expand('%') . '"' )
if has('python')
autocmd BufReadPost * execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output "' . expand('%') . '"' )
endif
else
" auto-indent
set autoindent