[vim]fix indent finder on not real file

This commit is contained in:
Mathieu Maret 2015-02-27 16:25:09 +01:00 committed by Mathieu Maret
parent 274a0375b7
commit 6ec7ecf12d

8
.vimrc
View File

@ -24,7 +24,7 @@
" M-left/right horizontal size
" M-up/down vertical size
" gc comment/uncomment
" C-I indent selection
" C-K indent selection
" Use snippets with tab e.g : for <tab> (see .vim/bundle/vim-snippets/snippets for available
" snippets)
@ -156,7 +156,7 @@ if has("autocmd")
" filetype plugin indent on
" detect indentation see http://www.freehackers.org/Indent_Finder
if has('python')
autocmd BufReadPost * execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output "' . expand('%') . '"' )
autocmd BufReadPost /* execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output "' . expand('%') . '"' )
endif
else
" auto-indent
@ -169,8 +169,8 @@ else
"set indentexpr ""
endif
map <C-I> :pyf ~/.vim/syntax/clang-format.py<CR>
imap <C-I> <ESC>:pyf ~/.vim/syntax/clang-format.py<CR>i
map <C-K> :pyf ~/.vim/syntax/clang-format.py<CR>
imap <C-K> <ESC>:pyf ~/.vim/syntax/clang-format.py<CR>i
""""""""""
" SEARCH "