Changeset 81a73ed8 for postlfs/config/vimrc.xml
- Timestamp:
- 03/25/2020 03:07:11 PM (4 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 986f53b9
- Parents:
- fa3edfef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
postlfs/config/vimrc.xml
rfa3edfef r81a73ed8 24 24 </indexterm> 25 25 26 <para>The LFS book installs <application>Vim</application> 27 as its text editor. At this point it should be noted 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> 26 <para> 27 The LFS book installs <application>Vim</application> as its text editor. 28 At this point it should be noted that there are a <emphasis>lot</emphasis> 29 of different editing applications out there including 30 <application>Emacs</application>, <application>nano</application>, 31 <application>Joe</application> and many more. Anyone who has been 32 around the Internet (especially usenet) for a short time will certainly 33 have observed at least one flame war, usually involving 34 <application>Vim</application> and <application>Emacs</application> users! 35 </para> 34 36 35 <para>The LFS book creates a basic <filename>vimrc</filename> file. In this 36 section you'll find an attempt to enhance this file. At startup, 37 <command>vim</command> reads the global configuration file 38 (<filename>/etc/vimrc</filename>) as well as a user-specific file 39 (<filename>~/.vimrc</filename>). Either or both can be tailored to suit 40 the needs of your particular system.</para> 37 <para> 38 The LFS book creates a basic <filename>vimrc</filename> file. In this 39 section you'll find an attempt to enhance this file. At startup, 40 <command>vim</command> reads the global configuration file 41 (<filename>/etc/vimrc</filename>) as well as a user-specific file 42 (<filename>~/.vimrc</filename>). Either or both can be tailored to suit 43 the needs of your particular system. 44 </para> 41 45 42 <para>Here is a slightly expanded <filename>.vimrc</filename> that you can 43 put in <filename>~/.vimrc</filename> to provide user specific effects. Of 44 course, if you put it into <filename>/etc/skel/.vimrc</filename> instead, it 45 will be made available to users you add to the system later. You can also copy 46 the file from <filename>/etc/skel/.vimrc</filename> to the home directory of 47 users already on the system, such as 48 <systemitem class='username'>root</systemitem>. Be sure to set permissions, 49 owner, and group if you do copy anything directly from 50 <filename class="directory">/etc/skel</filename>.</para> 46 <para> 47 Here is a slightly expanded <filename>.vimrc</filename> that you can put 48 in <filename>~/.vimrc</filename> to provide user specific effects. Of 49 course, if you put it into <filename>/etc/skel/.vimrc</filename> instead, 50 it will be made available to users you add to the system later. You 51 can also copy the file from <filename>/etc/skel/.vimrc</filename> to 52 the home directory of users already on the system, such as <systemitem 53 class='username'>root</systemitem>. Be sure to set permissions, owner, 54 and group if you do copy anything directly from <filename 55 class="directory">/etc/skel</filename>. 56 </para> 51 57 52 58 <screen><literal>" Begin .vimrc … … 58 64 " End .vimrc</literal></screen> 59 65 60 <para>Note that the comment tags are " instead of the more 61 usual # or //. This is correct, the syntax for 62 <filename>vimrc</filename> is slightly unusual.</para> 66 <para> 67 Note that the comment tags are " instead of the more 68 usual # or //. This is correct, the syntax for 69 <filename>vimrc</filename> is slightly unusual. 70 </para> 63 71 64 <para>Below you'll find a quick explanation of what each of the 65 options in this example file means here:</para> 72 <para> 73 Below you'll find a quick explanation of what each of the 74 options in this example file means here: 75 </para> 66 76 67 77 <itemizedlist> 68 78 <!-- 69 79 <listitem> 70 <para><option>set nocompatible</option> : This option 71 stops <command>vim</command> from behaving in a strongly <command>vi 72 </command>-compatible way. It should be at the start of any <filename>vimrc 73 </filename> file as it can affect lots of other options which you may want to 74 override.</para> 80 <para> 81 <option>set nocompatible</option> : This option 82 stops <command>vim</command> from behaving in a strongly <command>vi 83 </command>-compatible way. It should be at the start of any 84 <filename>vimrc </filename> file as it can affect lots of other 85 options which you may want to override. 86 </para> 75 87 </listitem> 76 88 <listitem> 77 <para><option>set bs=2</option>: This influences the behavior 78 of the backspace option. It is fairly complex so see <command>:help 'bs' 79 </command> for more details.</para> 89 <para> 90 <option>set bs=2</option>: This influences the behavior of the 91 backspace option. It is fairly complex so see <command>:help 'bs' 92 </command> for more details. 93 </para> 80 94 </listitem> 81 95 --> 82 96 <listitem> 83 <para><option>set columns=80</option>: This simply sets the 84 number of columns used on the screen.</para> 97 <para> 98 <option>set columns=80</option>: This simply sets the 99 number of columns used on the screen. 100 </para> 85 101 </listitem> 86 102 <!-- 87 103 <listitem> 88 <para><option>set background=dark</option>: This tells 89 <command>vim</command> to use colors which look good on a dark 90 background.</para> 104 <para> 105 <option>set background=dark</option>: This tells 106 <command>vim</command> to use colors which look good on a dark 107 background. 108 </para> 91 109 </listitem> 92 110 --> 93 111 <listitem> 94 <para><option>set wrapmargin=8</option>: This is the number of 95 characters from the right window border where wrapping starts.</para> 112 <para> 113 <option>set wrapmargin=8</option>: This is the number of 114 characters from the right window border where wrapping starts. 115 </para> 96 116 </listitem> 97 117 <!-- 98 118 <listitem> 99 <para><option>syntax on</option>: Enables 100 <command>vim</command>'s syntax highlighting.</para> 119 <para> 120 <option>syntax on</option>: Enables 121 <command>vim</command>'s syntax highlighting. 122 </para> 101 123 </listitem> 102 124 --> 103 125 <listitem> 104 <para><option>set ruler</option>: This makes <command>vim</command> 105 show the current row and column at the bottom right of the screen.</para> 126 <para> 127 <option>set ruler</option>: This makes <command>vim</command> 128 show the current row and column at the bottom right of the screen. 129 </para> 106 130 </listitem> 107 131 </itemizedlist> 108 132 109 <para>More information on the <emphasis>many</emphasis> 110 <command>vim</command> options can be found by reading the help 111 inside <command>vim</command> itself. Do this by typing 112 <command>:</command><option>help</option> in 113 <command>vim</command> to get the general help, or by typing 114 <command>:</command><option>help usr_toc.txt</option> to view 115 the User Manual Table of Contents.</para> 133 <para> 134 More information on the <emphasis>many</emphasis> 135 <command>vim</command> options can be found by reading the help 136 inside <command>vim</command> itself. Do this by typing 137 <command>:</command><option>help</option> in 138 <command>vim</command> to get the general help, or by typing 139 <command>:</command><option>help usr_toc.txt</option> to view 140 the User Manual Table of Contents. 141 </para> 116 142 117 143 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.