Changeset 1cb62b2
- Timestamp:
- 05/12/2005 09:41:02 PM (19 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 1c579035
- Parents:
- 991aa6f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
postlfs/config/vimrc.xml
r991aa6f r1cb62b2 7 7 8 8 <sect1 id="postlfs-config-vimrc" xreflabel="The vimrc Files"> 9 <sect1info> 10 <othername>$LastChangedBy$</othername> 11 <date>$Date$</date> 12 </sect1info> 13 <?dbhtml filename="vimrc.html"?> 14 <title>The /etc/vimrc and ~/.vimrc Files</title> 15 <indexterm zone="postlfs-config-vimrc"> 16 <primary sortas="e-etc-vimrc">/etc/vimrc</primary></indexterm> 17 <indexterm zone="postlfs-config-vimrc"> 18 <primary sortas="e-AA.vimrc">~/.vimrc</primary></indexterm> 9 <?dbhtml filename="vimrc.html"?> 19 10 20 <para>The <acronym>LFS</acronym> book installs <application>Vim</application> 21 as its text editor. At this point we should state that there are a 22 <emphasis>lot</emphasis> of different editing applications out there including 23 <application>Emacs</application>, <application>nano</application>, 24 <application>Joe</application> and many more. Anyone who has been around the 25 Internet (especially usenet) for a short time will certainly have observed at 26 least one flame war, usually involving <application>Vim</application> and 27 <application>Emacs</application> users!</para> 11 <sect1info> 12 <othername>$LastChangedBy$</othername> 13 <date>$Date$</date> 14 </sect1info> 28 15 29 <para>The <acronym>LFS</acronym> book gives a basic <filename>vimrc 30 </filename> file. Here, we attempt to enhance this file. At startup, 31 <command>vim</command> reads <filename>/etc/vimrc</filename> and 32 <filename>~/.vimrc</filename> (i.e., the global 33 <filename>vimrc</filename> and the user-specific one.). Note that this is 34 only true if you compiled <application>vim</application> using 35 <acronym>LFS</acronym>-3.1 onwards. Prior to this, 36 the global <filename>vimrc</filename> was 37 <filename>/usr/share/vim/vimrc</filename>.</para> 16 <title>The /etc/vimrc and ~/.vimrc Files</title> 38 17 39 <para>Here is a slightly expanded <filename>.vimrc</filename> that you can 40 put in <filename>~/.vimrc</filename> to provide user specific effects. Of 41 course, if you put it into <filename>/etc/skel/.vimrc</filename> instead, it 42 will be made available to users you add to the system later. You can also copy 43 the file from <filename>/etc/skel/.vimrc</filename> to the home directory of 44 users already on the system, like root. Be sure to set permissions, owner, and 45 group if you do copy anything directly from 46 <filename>/etc/skel</filename>.</para> 18 <indexterm zone="postlfs-config-vimrc"> 19 <primary sortas="e-etc-vimrc">/etc/vimrc</primary> 20 </indexterm> 47 21 48 <screen>" Begin .vimrc 22 <indexterm zone="postlfs-config-vimrc"> 23 <primary sortas="e-AA.vimrc">~/.vimrc</primary> 24 </indexterm> 25 26 <para>The LFS book installs <application>Vim</application> 27 as its text editor. At this point we should state that there are a 28 <emphasis>lot</emphasis> of different editing applications out there including 29 <application>Emacs</application>, <application>nano</application>, 30 <application>Joe</application> and many more. Anyone who has been around the 31 Internet (especially usenet) for a short time will certainly have observed at 32 least one flame war, usually involving <application>Vim</application> and 33 <application>Emacs</application> users!</para> 34 35 <para>The LFS book gives a basic <filename>vimrc</filename> file. Here, we 36 attempt to enhance this file. At startup, <command>vim</command> reads 37 <filename>/etc/vimrc</filename> and <filename>~/.vimrc</filename> (i.e., the 38 global <filename>vimrc</filename> and the user-specific one.). Note that this is 39 only true if you compiled <application>vim</application> using LFS-3.1 onwards. 40 Prior to this, the global <filename>vimrc</filename> was 41 <filename>/usr/share/vim/vimrc</filename>.</para> 42 43 <para>Here is a slightly expanded <filename>.vimrc</filename> that you can 44 put in <filename>~/.vimrc</filename> to provide user specific effects. Of 45 course, if you put it into <filename>/etc/skel/.vimrc</filename> instead, it 46 will be made available to users you add to the system later. You can also copy 47 the file from <filename>/etc/skel/.vimrc</filename> to the home directory of 48 users already on the system, like root. Be sure to set permissions, owner, and 49 group if you do copy anything directly from 50 <filename class="directory">/etc/skel</filename>.</para> 51 52 <screen><literal>" Begin .vimrc 49 53 50 54 set columns=80 … … 52 56 set ruler 53 57 54 " End .vimrc</ screen>58 " End .vimrc</literal></screen> 55 59 56 <para>A <acronym>FAQ</acronym> on the <acronym>LFS</acronym> mailing lists57 regards the comment tags in <filename>vimrc</filename>. Note that they are "58 instead of the moreusual # or //. This is correct, the syntax for59 <filename>vimrc</filename> is slightly unusual.</para>60 <para>A FAQ on the LFS mailing lists regards the comment tags in 61 <filename>vimrc</filename>. Note that they are " instead of the more 62 usual # or //. This is correct, the syntax for 63 <filename>vimrc</filename> is slightly unusual.</para> 60 64 61 <para>We'll run through a quick explanation of what each of the62 options in this example file means here:</para>65 <para>We'll run through a quick explanation of what each of the 66 options in this example file means here:</para> 63 67 64 <itemizedlist> 65 <!-- <listitem><para><option>set nocompatible</option> : This option 66 stops <command>vim</command> from behaving in a strongly <command>vi 67 </command>-compatible way. It should be at the start of any <filename>vimrc 68 </filename> file as it can affect lots of other options which you may want to 69 override.</para></listitem> 68 <itemizedlist> 69 <!-- 70 <listitem> 71 <para><option>set nocompatible</option> : This option 72 stops <command>vim</command> from behaving in a strongly <command>vi 73 </command>-compatible way. It should be at the start of any <filename>vimrc 74 </filename> file as it can affect lots of other options which you may want to 75 override.</para> 76 </listitem> 77 <listitem> 78 <para><option>set bs=2</option>: This influences the behavior 79 of the backspace option. It is fairly complex so see <command>:help 'bs' 80 </command> for more details.</para> 81 </listitem> 82 --> 83 <listitem> 84 <para><option>set columns=80</option>: This simply sets the 85 number of columns used on the screen.</para> 86 </listitem> 87 <!-- 88 <listitem> 89 <para><option>set background=dark</option>: This tells 90 <command>vim</command> to use colors which look good on a dark 91 background.</para> 92 </listitem> 93 --> 94 <listitem> 95 <para><option>set wrapmargin=8</option>: This is the number of 96 characters from the right window border where wrapping starts.</para> 97 </listitem> 98 <!-- 99 <listitem> 100 <para><option>syntax on</option>: Enables 101 <command>vim</command>'s syntax highlighting.</para> 102 </listitem> 103 --> 104 <listitem> 105 <para><option>set ruler</option>: This makes <command>vim</command> 106 show the current row and column at the bottom right of the screen.</para> 107 </listitem> 108 </itemizedlist> 70 109 71 <listitem><para><option>set bs=2</option>: This influences the behavior 72 of the backspace option. It is fairly complex so see <command>:help 'bs' 73 </command> for more details.</para></listitem> --> 74 75 <listitem><para><option>set columns=80</option>: This simply sets the 76 number of columns used on the screen.</para></listitem> 77 78 <!-- <listitem><para><option>set background=dark</option>: This tells 79 <command>vim</command> to use colors which look good on a dark 80 background.</para></listitem> --> 81 82 <listitem><para><option>set wrapmargin=8</option>: This is the number of 83 characters from the right window border where wrapping starts.</para> 84 </listitem> 85 86 <!-- <listitem><para><option>syntax on</option>: Enables 87 <command>vim</command>'s syntax highlighting.</para></listitem> --> 88 89 <listitem><para><option>set ruler</option>: This makes 90 <command>vim</command> show the current row and column at the bottom right of 91 the screen.</para></listitem> 92 </itemizedlist> 93 94 <para>More information on the <emphasis>many</emphasis> <command>vim</command> 95 options can be found by reading the help inside <command>vim</command> itself. 96 Do this by typing <command>:</command><option>help</option> in 97 <command>vim</command> to get the general help, or by typing 98 <command>:</command><option>help usr_toc.txt</option> to view 99 the User Manual Table of Contents.</para> 110 <para>More information on the <emphasis>many</emphasis> 111 <command>vim</command> options can be found by reading the help 112 inside <command>vim</command> itself. Do this by typing 113 <command>:</command><option>help</option> in 114 <command>vim</command> to get the general help, or by typing 115 <command>:</command><option>help usr_toc.txt</option> to view 116 the User Manual Table of Contents.</para> 100 117 101 118 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.