[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-ia64-devel] vimrc snippet
If anybody is interested, here is a vimrc snippet to cause vim to conform to the indentation already in a file. You can set the default to whatever you personally prefer. " default to allowing tab characters set noexpandtab " detect settings of file being edited and change ours to match autocmd BufReadPost *.c,*.h \ let foundtab = search('^\t\|^\( \{8}\)', 'cnpw') | \ if foundtab == 1 | setlocal noexpandtab | \ elseif foundtab == 2 | setlocal expandtab | endif I hope somebody finds that helpful. :-) Aron _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |