aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHu Tao <hutao@cn.fujitsu.com>2011-03-17 10:35:17 +0800
committerEric Blake <eblake@redhat.com>2011-03-17 17:08:51 -0600
commit838f66968232a27d1867b4b2549e97bb58f6d490 (patch)
tree5b48be0ee215478d2cdf3f19b72ce2789d3941c7 /docs/hacking.html.in
parentMake virDomainObjParseNode() static (diff)
downloadlibvirt-838f66968232a27d1867b4b2549e97bb58f6d490.tar.gz
libvirt-838f66968232a27d1867b4b2549e97bb58f6d490.tar.bz2
libvirt-838f66968232a27d1867b4b2549e97bb58f6d490.zip
Add vim configuration that makes vim auto-indent code
Diffstat (limited to 'docs/hacking.html.in')
-rw-r--r--docs/hacking.html.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index 0d81b0bed..e0484dd59 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -101,6 +101,32 @@
(libvirt-c-mode))))
</pre>
+ <p>
+ If you use vim, append the following to your ~/.vimrc file:
+ </p>
+<pre>
+ 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/
+</pre>
+ <p>
+ Or if you don't want to mess your ~/.vimrc up, you can save the above
+ into a file called .lvimrc (not .vimrc) located at the root of libvirt
+ source, then install a vim script from
+ http://www.vim.org/scripts/script.php?script_id=1408,
+ which will load the .lvimrc only when you edit libvirt code.
+ </p>
+
<h2><a name="formatting">Code formatting (especially for new code)</a></h2>
<p>