source: postlfs/config/vimrc.xml@ ccded7e

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
Last change on this file since ccded7e was 81a73ed8, checked in by Pierre Labastie <pieere@…>, 4 years ago

Format postlfs config

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22886 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="postlfs-config-vimrc" xreflabel="The vimrc Files">
9 <?dbhtml filename="vimrc.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>The /etc/vimrc and ~/.vimrc Files</title>
17
18 <indexterm zone="postlfs-config-vimrc">
19 <primary sortas="e-etc-vimrc">/etc/vimrc</primary>
20 </indexterm>
21
22 <indexterm zone="postlfs-config-vimrc">
23 <primary sortas="e-AA.vimrc">~/.vimrc</primary>
24 </indexterm>
25
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>
36
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>
45
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>
57
58<screen><literal>" Begin .vimrc
59
60set columns=80
61set wrapmargin=8
62set ruler
63
64" End .vimrc</literal></screen>
65
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>
71
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>
76
77 <itemizedlist>
78 <!--
79 <listitem>
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>
87 </listitem>
88 <listitem>
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>
94 </listitem>
95 -->
96 <listitem>
97 <para>
98 <option>set columns=80</option>: This simply sets the
99 number of columns used on the screen.
100 </para>
101 </listitem>
102 <!--
103 <listitem>
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>
109 </listitem>
110 -->
111 <listitem>
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>
116 </listitem>
117 <!--
118 <listitem>
119 <para>
120 <option>syntax on</option>: Enables
121 <command>vim</command>'s syntax highlighting.
122 </para>
123 </listitem>
124 -->
125 <listitem>
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>
130 </listitem>
131 </itemizedlist>
132
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>
142
143</sect1>
Note: See TracBrowser for help on using the repository browser.