[libvirt] [PATCH] Add vim configuration that makes vim auto-indent code
Eric Blake
eblake at redhat.com
Wed Mar 16 15:11:25 UTC 2011
On 03/16/2011 04:01 AM, Hu Tao wrote:
> ---
>
> What about this one?
>
>
> HACKING | 16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)
HACKING is generated. Edit docs/hacking.html.in instead.
>
> +If you use vim, append the following to your ~/.vimrc file:
> +
> + set nocompatible
> + filetype on
> + set autoindent
> + set smartindent
> + set cindent
> + set tabstop=8
> + set shiftwidth=4
> + set expandtab
> + set cinoptions=(0,:0,l1,t0
> + filetype plugin indent on
> + au FileType make setlocal noexpandtab
> + au BufRead,BufNewFile *.am setlocal noexpandtab
> + match ErrorMsg /\s\+$\| \+\ze\t/
You may also want to mention how to install .lvimrc files and use the
script from http://www.vim.org/scripts/script.php?script_id=1408 (it is
possible to 'echo .lvimrc >> .git/info/exclude' to avoid accidentally
commiting it), even if we don't push .lvimrc into the repository.
Is there any way to make configuration of tabstop/expandtab conditional
based on whether the file is a Makefile or something else, so that you
can continue to use proper TABs where they are required?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110316/89736fb6/attachment-0001.sig>
More information about the libvir-list
mailing list