vim-sleuth is good plugin.