A minor diff to update the vim patchlevel and a question.

Ag. Hatzimanikas a.hatzim at gmail.com
Tue Mar 6 04:27:59 PST 2007


The missing attachments.
-------------- next part --------------
Index: postlfs/editors/vim.xml
===================================================================
--- postlfs/editors/vim.xml	(revision 6659)
+++ postlfs/editors/vim.xml	(working copy)
@@ -67,7 +67,7 @@
     <itemizedlist spacing='compact'>
       <listitem>
         <para>Recommended Patch: <ulink
-          url="&patch-root;/vim-&vim-version;-fixes-14.patch"/></para>
+          url="&patch-root;/vim-&vim-version;-fixes-15.patch"/></para>
       </listitem>
       <listitem>
         <para>Recommended Patch: <ulink
@@ -120,7 +120,7 @@
     <para>Install <application>Vim</application> by running the following
     commands:</para>
 
-<screen><userinput>patch -Np1 -i ../vim-&vim-version;-fixes-14.patch &&
+<screen><userinput>patch -Np1 -i ../vim-&vim-version;-fixes-15.patch &&
 patch -Np1 -i ../vim-&vim-version;-mandir-1.patch &&
 echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h &&
 echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h &&
-------------- next part --------------
Index: postlfs/config/vimrc.xml
===================================================================
--- postlfs/config/vimrc.xml	(revision 6656)
+++ postlfs/config/vimrc.xml	(working copy)
@@ -36,10 +36,7 @@
   section you'll find an attempt to enhance this file. At startup,
   <command>vim</command> reads <filename>/etc/vimrc</filename> and
   <filename>~/.vimrc</filename> (i.e., the global <filename>vimrc</filename>
-  and the user-specific one).  Note that this is only true if you compiled
-  <application>vim</application> using LFS-3.1 onwards. Prior to this, the
-  global <filename>vimrc</filename> was
-  <filename>/usr/share/vim/vimrc</filename>.</para>
+  and the user-specific one).</para>
 
   <para>Here is a slightly expanded <filename>.vimrc</filename> that you can
   put in <filename>~/.vimrc</filename> to provide user specific effects. Of
@@ -53,10 +50,34 @@
 
 <screen><literal>" Begin .vimrc
 
+set autoindent
 set columns=80
+set history=50
+set ruler
+set showcmd
+set wildmenu
 set wrapmargin=8
-set ruler
 
+if &t_Co > 2 || has("gui_running")
+syntax on
+set hlsearch
+endif
+
+if has("autocmd")
+   autocmd BufRead *.txt set tw=78
+   autocmd BufEnter * lcd %:p:h
+   autocmd BufReadPost *
+  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
+  \   exe "normal g'\"" |
+  \ endif
+endif
+
+if has("gui_running")
+map <S-Insert> <MiddleMouse>
+map! <S-Insert> <MiddleMouse>
+set guifont=DejaVu\ Sans\ Mono\ 12
+endif
+
 " End .vimrc</literal></screen>
 
   <para>Note that the comment tags are " instead of the more
@@ -80,32 +101,66 @@
       of the backspace option.  It is fairly complex so see <command>:help 'bs'
       </command> for more details.</para>
     </listitem>
+    <listitem>
+      <para><option>set background=dark</option>: This tells
+      <command>vim</command> to use colors which look good on a dark
+      background.</para>
+    </listitem>
+    <listitem>
+      <para><option>syntax on</option>: Enables
+      <command>vim</command>'s syntax highlighting.</para>
+    </listitem>
     -->
     <listitem>
+      <para><option>set autoindent</option>: This makes <command>vim</command> to
+     obtain the indent of the new line from the previous line.
+     <emphasis>Note</emphasis>. The <option>'autoindent'</option> option is reset when the
+     <option>'paste'</option> option is set.</para>
+     </listitem>
+    <listitem>
+      <para><option>set history=50</option>: The number of command-lines that are remembered
+      in the history table. Default are 20.</para>
+    </listitem>
+    <listitem>
       <para><option>set columns=80</option>: This simply sets the
       number of columns used on the screen.</para>
     </listitem>
-    <!--
     <listitem>
-      <para><option>set background=dark</option>: This tells
-      <command>vim</command> to use colors which look good on a dark
-      background.</para>
+      <para><option>set ruler</option>: This makes <command>vim</command>
+      show the current row and column at the bottom right of the screen.</para>
     </listitem>
-    -->
     <listitem>
+      <para><option>set showcmd</option>: Show (partial) command in status line.</para>
+    </listitem>
+    <listitem>
+      <para><option>set wildmenu</option>: Make the command line completion to operate in
+       an enhanced mode. Issue <literal>:help wildmenu</literal> to know more about it's usage.</para>
+    </listitem>
+    <listitem>
       <para><option>set wrapmargin=8</option>: This is the number of
       characters from the right window border where wrapping starts.</para>
     </listitem>
-    <!--
     <listitem>
-      <para><option>syntax on</option>: Enables
-      <command>vim</command>'s syntax highlighting.</para>
+     <para><option>if &t_Co > ...</option>: If the number of supported colors is more than 2,
+     or <command>vim</command> is running in GUI mode,then:
+     a.Enable syntax highlighting.
+     b.Highlight all of the matched text during a search.
+     </para>
     </listitem>
-    -->
     <listitem>
-      <para><option>set ruler</option>: This makes <command>vim</command>
-      show the current row and column at the bottom right of the screen.</para>
+      <para><option>if has("autocmd") ...</option>: If <command>vim</command> compiled with 
+      <option>autocmd</option> support then:
+     a.For every file with a .txt extension, limit the width of text to 78 characters.
+     b.Automatically change the current directory to the directory of the current file.
+     c.Jump to the last cursor position when you are reopening a file.
+     </para>
     </listitem>
+    <listitem>
+     <para><option>if has("gui_running") ...</option>: If running in GUI mode then:
+      a.Make shift-insert work like in Xterm.
+      b.Set the desired font, in our example the Sans Mono from the DejaVu font family.
+     </para>
+    </listitem>
   </itemizedlist>
 
   <para>More information on the <emphasis>many</emphasis>


More information about the blfs-dev mailing list