浏览代码

Replace tabs by spaces in vimrc

Emmanuel Bouthenot 12 年之前
父节点
当前提交
7b496ccae9
共有 1 个文件被更改,包括 39 次插入39 次删除
  1. 39 39
      .vim/vimrc

+ 39 - 39
.vim/vimrc

@@ -24,12 +24,12 @@ set directory=~/.vim/tmp "directory to place swap files in
 
 "Encoding settings
 if has("multi_byte")
-	if &termencoding == ""
-		let &termencoding = &encoding
-	endif
-	set encoding=utf-8
-	setglobal fileencoding=utf-8 bomb
-	set fileencodings=ucs-bom,utf-8,default,latin1
+    if &termencoding == ""
+        let &termencoding = &encoding
+    endif
+    set encoding=utf-8
+    setglobal fileencoding=utf-8 bomb
+    set fileencodings=ucs-bom,utf-8,default,latin1
 endif
 
 "Syntax highlight
@@ -148,17 +148,17 @@ set softtabstop=4
 set showmatch "brace/parenthese/bracket matching
 set nowrap "wrap long lines
 if has("multi_byte")
-	set showbreak="…"
+    set showbreak="…"
 else
-	set showbreak="+++"
+    set showbreak="+++"
 endif
 
 "show some not printable chars
 set list
 if has("multi_byte")
-	set listchars=trail:·,extends:>,precedes:<,nbsp:•,tab:→\ 
+    set listchars=trail:·,extends:>,precedes:<,nbsp:•,tab:→\ 
 else
-	set listchars=tab:>.,trail:·,extends:>,precedes:<,nbsp:%
+    set listchars=tab:>.,trail:·,extends:>,precedes:<,nbsp:%
 endif
 
 "search settings
@@ -181,10 +181,10 @@ set foldlevel=1
 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 if has('autocmd')
-	autocmd BufRead ~/.mutt/tmp/mutt-* set filetype=mail
-	autocmd FileType mail set autoindent expandtab formatoptions=tcqn
-	autocmd FileType mail vmap D dO[...]<CR>
-	autocmd FileType mail call EnableSpellChecking()
+    autocmd BufRead ~/.mutt/tmp/mutt-* set filetype=mail
+    autocmd FileType mail set autoindent expandtab formatoptions=tcqn
+    autocmd FileType mail vmap D dO[...]<CR>
+    autocmd FileType mail call EnableSpellChecking()
 endif
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -198,11 +198,11 @@ filetype plugin indent on
 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 if has('autocmd')
-	"reload Vim config file after saving
-	autocmd BufWritePost $MYVIMRC :source $MYVIMRC
-	"always limit the width for text files
-	autocmd BufRead *.txt set tw=78
-	autocmd QuickFixCmdPre * botright cwindow 5
+    "reload Vim config file after saving
+    autocmd BufWritePost $MYVIMRC :source $MYVIMRC
+    "always limit the width for text files
+    autocmd BufRead *.txt set tw=78
+    autocmd QuickFixCmdPre * botright cwindow 5
 endif
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -211,21 +211,21 @@ endif
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 "set spellfile=~/.vim/spell/words
 function! EnableSpellChecking()
-	setlocal spell spelllang=fr,en_us
-	let b:spell = 1
+    setlocal spell spelllang=fr,en_us
+    let b:spell = 1
 endfunction
 
 function! DisableSpellChecking()
-	setlocal nospell
-	unlet b:spell
+    setlocal nospell
+    unlet b:spell
 endfunction
 
 function! ToggleSpell()
-	if !exists("b:spell")
-		execute 'call EnableSpellChecking()'
-	else
-		execute 'call DisableSpellChecking()'
-	endif
+    if !exists("b:spell")
+        execute 'call EnableSpellChecking()'
+    else
+        execute 'call DisableSpellChecking()'
+    endif
 endfunction
 
 nmap <F4> :call ToggleSpell()<CR>
@@ -257,17 +257,17 @@ nnoremap <silent> <F9> :Tlist<CR>
 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 function! CleanClose()
-	let todelbufNr = bufnr("%")
-	let newbufNr = bufnr("#")
-	if ((newbufNr != -1) && (newbufNr != todelbufNr) && buflisted(newbufNr))
-		exe "b".newbufNr
-	else
-		bnext
-	endif
-	if (bufnr("%") == todelbufNr)
-		new
-	endif
-	exe "bd".todelbufNr
+    let todelbufNr = bufnr("%")
+    let newbufNr = bufnr("#")
+    if ((newbufNr != -1) && (newbufNr != todelbufNr) && buflisted(newbufNr))
+        exe "b".newbufNr
+    else
+        bnext
+    endif
+    if (bufnr("%") == todelbufNr)
+        new
+    endif
+    exe "bd".todelbufNr
 endfunction