Windows compatibility.
[profile.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 9cc96fd..6e26f27 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -17,6 +17,11 @@ version 4.0
 " No compatibility mode.
 se nocp
 
+" Find stuff.
+if has("win32")
+  se rtp=~/.vim,$VIMRUNTIME
+endif
+
 " Tabstop 2.
 se ts=2
 " And use spaces not tabs.
@@ -366,6 +371,34 @@ map Q <NOP>
 " Vim tip 99: What's the highlighting group under the cursor?
 call Mapping("h", ":echo \"hi<\" . synIDattr(synID(line(\".\"),col(\".\"),1),\"name\") . '> trans<' . synIDattr(synID(line(\".\"),col(\".\"),0),\"name\") . \"> lo<\" . synIDattr(synIDtrans(synID(line(\".\"),col(\".\"),1)),\"name\") . \">\"<CR>")
 
+fun! Uncluttered_Buffer()
+  if exists("uncluttered_buffer")
+    if uncluttered_buffer == 1
+      return 1
+    endif
+  endif
+
+  if version >= "600"
+    if &buftype != ''
+      return 1
+    endif
+  endif
+
+  if &ft == 'perforce'
+    return 1
+  endif
+
+  if &ft == 'svn'
+    return 1
+  endif
+
+  if &ft == 'gitcommit'
+    return 1
+  endif
+
+  return 0
+endfun
+
 fun! Startup_Resize()
   let l:columns = 0
 
@@ -393,7 +426,7 @@ fun! Startup_Resize()
 endfun
 
 " Show numbers by default.
-au Display VimEnter * call Number(0)
+au Display VimEnter * if ! Uncluttered_Buffer() | call Number(0) | endif
 endif
 
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -529,7 +562,7 @@ fun! <SID>Place_Sign(number, line, old, name)
 endfun
 
 fun! <SID>Highlight_Signs(...)
-  if ! has("signs") || ! g:marksigns
+  if ! has("signs") || ! g:marksigns || Uncluttered_Buffer()
     return
   endif