Hello. I'm relatively new to VIM, I wondered if there was a way to mimic the style used in the current file. I use two spaces to indent my code (two real spaces, not tab characters) but I know that many people use real tabs. I would like to be able to automatically mimic the style of the file that I am editing.
My current .vimrc: -- "$Id: vimrc,v 1.6 2006/01/17 06:38:02 anm Exp $ :set textwidth=72 :set nowrap :syntax on :set hls :set tabstop=2 :set noautoindent :set expandtab :set softtabstop=2 :set nomodeline :set ruler :set showcmd :set encoding=utf-8 au FileType make setlocal noexpandtab au Filetype Mkfile- setlocal noexpandtab au FileType c,cpp,cxx setlocal tw=79 au FileType htm,html,php setlocal tw=9999 au FileType txt setlocal tw=80 :set nocompatible -- thanks, MC