WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] vimrc snippet

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] vimrc snippet
From: Aron Griffis <aron@xxxxxx>
Date: Mon, 17 Sep 2007 10:29:38 -0400
Delivery-date: Mon, 17 Sep 2007 07:29:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.16 (2007-06-11)
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

<Prev in Thread] Current Thread [Next in Thread>