[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Add vim configuration that makes vim auto-indent code



On Wed, Mar 16, 2011 at 10:53:27AM +0800, Hu Tao wrote:
> ---
>  .lvimrc |   10 ++++++++++
>  HACKING |    5 +++++
>  2 files changed, 15 insertions(+), 0 deletions(-)
>  create mode 100644 .lvimrc
> 
> diff --git a/.lvimrc b/.lvimrc
> new file mode 100644
> index 0000000..3a732ce
> --- /dev/null
> +++ b/.lvimrc
> @@ -0,0 +1,10 @@
> +set nocompatible
> +filetype on
> +set autoindent
> +set smartindent
> +set cindent
> +set tabstop=4
> +set shiftwidth=4
> +set expandtab
> +set cinoptions=(0,:0,l1,t0
> +filetype plugin indent on
> diff --git a/HACKING b/HACKING
> index 4a71b37..adfb7ae 100644

  Heh, I use vim, but I would rather not put a configuration file in the
tree, especially with autoindent which may defeat people typing habits.

BTW I use the following:

set autoindent
set autowrite
set keywordprg=
set shiftwidth=4
set softtabstop=4
set expandtab
set tabstop=8
au FileType make setlocal noexpandtab
set showmode
syntax on
set backspace=2
set clipboard=""
set nohls
let c_space_errors=1
highlight RedundantSpaces ctermbg=red guibg=red
match RedundantSpaces /\s\+$\| \+\ze\t/

  BTW the last lines shows up in red any trailing spaces left at the end
of lines, tip given by Jim Meyering a couple of years ago

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]