ソースを参照

Update /etc/vimrc to set defaults properly

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11358 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Bruce Dubbs 7 年 前
コミット
173aea3c22
2 ファイル変更12 行追加7 行削除
  1. 3 0
      chapter01/changelog.xml
  2. 9 7
      chapter06/vim.xml

+ 3 - 0
chapter01/changelog.xml

@@ -45,6 +45,9 @@
     <listitem>
       <para>2018-01-30</para>
       <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Make /etc/vimrc set defaults properly.</para>
+        </listitem>
         <listitem revision="systemd">
           <para>[dj] - Update to systemd-237. Fixes
           <ulink url="&lfs-ticket-root;4203">#4203</ulink>.</para>

+ 9 - 7
chapter06/vim.xml

@@ -128,9 +128,13 @@ done</userinput></screen>
 <screen><userinput>cat &gt; /etc/vimrc &lt;&lt; "EOF"
 <literal>" Begin /etc/vimrc
 
+" Ensure defaults are set before customizing settings, not after
+source $VIMRUNTIME/defaults.vim
+let skip_defaults_vim=1 
+
 set nocompatible
 set backspace=2
-set mouse=r
+set mouse=
 syntax on
 if (&amp;term == "xterm") || (&amp;term == "putty")
   set background=dark
@@ -138,9 +142,7 @@ endif
 
 
 " End /etc/vimrc</literal>
-EOF
-
-touch ~/.vimrc</userinput></screen>
+EOF</userinput></screen>
 
     <para>The <parameter>set nocompatible</parameter> setting makes
     <command>vim</command> behave in a more useful way (the default) than the
@@ -148,18 +150,18 @@ touch ~/.vimrc</userinput></screen>
     <command>vi</command> behavior. The <parameter>set backspace=2</parameter>
     setting allows backspacing over line breaks, autoindents, and the start of
     insert. The <parameter>syntax on</parameter> parameter enables vim's syntax
-    highlighting.  The <parameter>set mouse=r</parameter> setting enables
+    highlighting.  The <parameter>set mouse=</parameter> setting enables
     proper pasting of text with the mouse when working in chroot or over a
     remote connection.  Finally, the <emphasis>if</emphasis> statement with the
     <parameter>set background=dark</parameter> setting corrects
     <command>vim</command>'s guess about the background color of some terminal
     emulators. This gives the highlighting a better color scheme for use on the
     black background of these programs.</para>
-
+<!--
     <para>Creating an empty <filename>~/.vimrc</filename> prevents vim from
     overriding settings in <filename>/etc/vimrc</filename> by using
     <filename>/usr/share/vim/vim80/defaults.vim</filename>.</para>
-
+-->
     <para>Documentation for other available options can be obtained by
     running the following command:</para>