Recovery plugin.
[profile.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index bc459b3..c2a88f8 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -745,6 +745,15 @@ fun! Show_Case() "{{{2
 endfun "}}}2
 
 " Helper for status line.
+" Mark DOS buffers.
+fun! Show_DOS() "{{{2
+  if &ff == "unix"
+    return ""
+  endif
+  return &ff . ","
+endfun "}}}2
+
+" Helper for status line.
 " Show the size of the tabstop.
 fun! Show_Tabstop() "{{{2
   return &ts
@@ -903,7 +912,7 @@ fun! Show_StatusLine() "{{{2
   " sl1 contains left-aligned stuff.
   " sl2 contains stuff shown only when verbose mode is enabled.
   " sl3 contains right-aligned stuff.
-  let l:sl1='%2n\:\ %<' . l:bold . '%f' . l:normal . '\ [%{Show_Encoding()}%{Show_List()}%{Show_Bind()}%{Show_Case()}%{Show_Tabstop()}%{Show_Paste()}%{Show_VirtualEdit()}%{Show_Undo()}%Y%M%R%{Show_SearchForward()}]%{Show_Alt()}\ '
+  let l:sl1='%2n\:\ %<' . l:bold . '%f' . l:normal . '\ [%{Show_Encoding()}%{Show_DOS()}%{Show_List()}%{Show_Bind()}%{Show_Case()}%{Show_Tabstop()}%{Show_Paste()}%{Show_VirtualEdit()}%{Show_Undo()}%Y%M%R%{Show_SearchForward()}]%{Show_Alt()}\ '
   let l:sl3='%{Show_Marks()}L:' . l:bold . '%4.6l' . l:normal . '/%-4.6L\ C:' . l:bold . '%3.6c%V' . l:normal . '\ \|\ %P'
   let l:hexformat='%b'
   if b:iainhex
@@ -1255,6 +1264,11 @@ endif "}}}1
 if version >= "700" "{{{1
 version 7.0
 
+" Narrow buffer with \w.
+call Mapping("w", ":NarrowRegion<CR>:<CR>")
+" Narrow window with \W.
+call Mapping("W", ":NarrowWindow<CR>:<CR>")
+
 " Helper to show tab name.
 fun! <SID>TabName(label, gui) "{{{2
   let l:label = a:label