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

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

 



---

What about this one?


 HACKING |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/HACKING b/HACKING
index 4a71b37..b86243a 100644
--- a/HACKING
+++ b/HACKING
@@ -87,6 +87,22 @@ If you use Emacs, add the following to one of one of your start-up files
             '(lambda () (if (string-match "/libvirt" (buffer-file-name))
                             (libvirt-c-mode))))
 
+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/
+
 
 Code formatting (especially for new code)
 =========================================
-- 
1.7.3.1


-- 
Thanks,
Hu Tao

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]