Changeset 3f0c882 for chapter06/vim.xml
- Timestamp:
- 12/21/2004 07:38:32 PM (19 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 3d36131c
- Parents:
- aaa3260
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/vim.xml
raaa3260 r3f0c882 11 11 12 12 <sect2 role="package"><title/> 13 <para>The Vim package contains a powerful text editor.</para>14 13 15 14 <segmentedlist> … … 19 18 </segmentedlist> 20 19 21 <segmentedlist>22 <segtitle>Vim installation depends on</segtitle>23 <seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,24 GCC, Glibc, Grep, Make, Ncurses, Sed</seg></seglistitem>25 </segmentedlist>26 27 <tip>28 <title>Alternatives to Vim</title>29 <para>If you prefer another editor -- like Emacs, Joe, or Nano -- to Vim,30 have a look at <ulink url="&blfs-root;view/stable/postlfs/editors.html"/> for31 suggested installation instructions.</para>32 </tip>33 20 </sect2> 34 21 … … 36 23 <title>Installation of Vim</title> 37 24 38 <para>First, unpack both 39 <filename>vim-&vim-version;.tar.bz2</filename> and (optionally) 40 <filename>vim-&vim-version;-lang.tar.gz</filename> archives into the same 41 directory. Then change the default locations of the <filename>vimrc</filename> and 42 <filename>gvimrc</filename> configuration files to <filename class="directory">/etc</filename>.</para> 25 <para>Change the default locations of the configuration files:</para> 43 26 44 27 <screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h … … 49 32 <screen><userinput>./configure --prefix=/usr --enable-multibyte</userinput></screen> 50 33 51 <para>The optional but highly recommended52 <parameter>--enable-multibyte</parameter> switch53 includes support for editing files in multibyte character encodings into54 <command>vim</command>.55 It is needed for those people who ignore our recommendation not to56 use LFS in locales with multibyte character sets. It is also needed for57 people who want to be able to edit text files initially created58 in Linux distributions like Fedora Core59 that use UTF-8 as a default character set.</para>60 61 34 <para>Compile the package:</para> 62 35 63 36 <screen><userinput>make</userinput></screen> 64 37 65 <para>To test the results, you can issue: 66 <userinput>make test</userinput>. However, this test suite outputs a lot of 67 seemingly garbage characters to the screen, and this can wreak havoc with the 68 settings of the current terminal. Therefore the running of the test suite here 69 is strictly optional.</para> 38 <para>To test the results, issue: 39 <userinput>make test</userinput></para> 70 40 71 41 <para>Now install the package:</para> … … 73 43 <screen><userinput>make install</userinput></screen> 74 44 75 <para>Many users are used to using <command>vi</command>, instead of 76 <command>vim</command>. To let them execute <command>vim</command> when 77 they habitually enter <command>vi</command>, create a symlink:</para> 45 <para>Create a symlink:</para> 78 46 79 47 <screen><userinput>ln -s vim /usr/bin/vi</userinput></screen> 80 81 <para>If you are going to install the X Window System on your LFS system, you82 may want to re-compile Vim after having installed X. Vim comes with a nice GUI83 version of the editor that requires X and a few other libraries to be84 installed. For more information read the Vim documentation.</para>85 48 86 49 </sect2> … … 88 51 89 52 <sect2 id="conf-vim" role="configuration"><title>Configuring Vim</title> 90 <indexterm zone="conf-vim"><primary sortas="e-/etc/vim">/etc/vim</primary></indexterm>91 53 92 <para>By default, <command>vim</command> runs in vi-incompatible mode. Some 93 people might not like this, but we prefer to run <command>vim</command> in its 94 own mode (else we wouldn't have included it in this book, but the original 95 <command>vi</command>). We've included the setting of <quote>nocompatible</quote> 96 below to high-light the fact that the new behavior is being used. It 97 also reminds those who would change to <quote>compatible</quote> mode that it should 98 appear first because it changes other settings and overrides must come 99 after this setting. Create a default vim configuration file by running 54 <para>Create a default vim configuration file by running 100 55 the following:</para> 101 56 … … 114 69 EOF</userinput></screen> 115 70 116 <para>The <parameter>set nocompatible</parameter> makes117 <command>vim</command> behave in a more useful way (the default) than the118 vi-compatible manner. Remove the <quote>no</quote> if you want the old <command>vi</command>119 behavior. The <parameter>set backspace=2</parameter> allows120 backspacing over line breaks, autoindents and the start of insert. The121 <parameter>syntax on</parameter> enables <command>vim</command>'s122 syntax highliting.123 71 <!-- XXX: the ascii-only files are considered to be in utf-8 - that's not what 124 72 one expects . That's why fileencodings stuff is commented out for now … … 134 82 passed the <parameter>- -enable-multibyte</parameter> switch to the 135 83 <command>./configure</command> command above, this line will not work. --> 136 Finally, the <emphasis>if</emphasis> statement with the137 <parameter>set background=dark</parameter> corrects <command>vim</command>'s138 guess about the background color of some terminal emulators. This gives the139 highliting a better color scheme for use on the black background of140 these programs.141 </para>142 84 143 85 <para>Documentation for other available options can be obtained by running … … 151 93 <sect2 id="contents-vim" role="content"><title>Contents of Vim</title> 152 94 153 <segmentedlist> 154 <segtitle>Installed programs</segtitle> 155 <seglistitem><seg>efm_filter.pl, efm_perl.pl, ex (link to vim), less.sh, mve.awk, 156 pltags.pl, ref, rview (link to vim), rvim (link to vim), shtags.pl, tcltags, vi (link to vim), 157 view (link to vim), vim, vim132, vim2html.pl, vimdiff (link to vim), vimm, vimspell.sh, 158 vimtutor and xxd</seg></seglistitem> 159 </segmentedlist> 160 161 <variablelist><title>Short descriptions</title> 162 163 <varlistentry id="efm_filter.pl"> 164 <term><command>efm_filter.pl</command></term> 165 <listitem> 166 <indexterm zone="ch-system-vim efm_filter.pl"><primary sortas="b-efm_filter.pl">efm_filter.pl</primary></indexterm> 167 <para>is a filter for creating an error file that can be read by <command>vim</command>.</para> 168 </listitem> 169 </varlistentry> 170 171 <varlistentry id="efm_perl.pl"> 172 <term><command>efm_perl.pl</command></term> 173 <listitem> 174 <indexterm zone="ch-system-vim efm_perl.pl"><primary sortas="b-efm_perl.pl">efm_perl.pl</primary></indexterm> 175 <para>reformats the error messages of the 176 Perl interpreter for use with the <quote>quickfix</quote> mode of <command>vim</command>.</para> 177 </listitem> 178 </varlistentry> 179 180 <varlistentry id="ex"> 181 <term><command>ex</command></term> 182 <listitem> 183 <indexterm zone="ch-system-vim ex"><primary sortas="b-ex">ex</primary></indexterm> 184 <para>starts <command>vim</command> in ex mode.</para> 185 </listitem> 186 </varlistentry> 187 188 <varlistentry id="less.sh"> 189 <term><command>less.sh</command></term> 190 <listitem> 191 <indexterm zone="ch-system-vim less.sh"><primary sortas="b-less.sh">less.sh</primary></indexterm> 192 <para>is a script that starts <command>vim</command> with less.vim.</para> 193 </listitem> 194 </varlistentry> 195 196 <varlistentry id="mve.awk"> 197 <term><command>mve.awk</command></term> 198 <listitem> 199 <indexterm zone="ch-system-vim mve.awk"><primary sortas="b-mve.awk">mve.awk</primary></indexterm> 200 <para>processes <command>vim</command> errors.</para> 201 </listitem> 202 </varlistentry> 203 204 <varlistentry id="pltags.pl"> 205 <term><command>pltags.pl</command></term> 206 <listitem> 207 <indexterm zone="ch-system-vim pltags.pl"><primary sortas="b-pltags.pl">pltags.pl</primary></indexterm> 208 <para>creates a tags file for Perl code, for use by <command>vim</command>.</para> 209 </listitem> 210 </varlistentry> 211 212 <varlistentry id="ref"> 213 <term><command>ref</command></term> 214 <listitem> 215 <indexterm zone="ch-system-vim ref"><primary sortas="b-ref">ref</primary></indexterm> 216 <para>checks the spelling of arguments.</para> 217 </listitem> 218 </varlistentry> 219 220 <varlistentry id="rview"> 221 <term><command>rview</command></term> 222 <listitem> 223 <indexterm zone="ch-system-vim rview"><primary sortas="b-rview">rview</primary></indexterm> 224 <para>is a restricted version of <command>view</command>: no shell 225 commands can be started and <command>view</command> can't be suspended.</para> 226 </listitem> 227 </varlistentry> 228 229 <varlistentry id="rvim"> 230 <term><command>rvim</command></term> 231 <listitem> 232 <indexterm zone="ch-system-vim rvim"><primary sortas="b-rvim">rvim</primary></indexterm> 233 <para>is a restricted version of <command>vim</command>: no shell 234 commands can be started and <command>vim</command> can't be suspended.</para> 235 </listitem> 236 </varlistentry> 237 238 <varlistentry id="shtags.pl"> 239 <term><command>shtags.pl</command></term> 240 <listitem> 241 <indexterm zone="ch-system-vim shtags.pl"><primary sortas="b-shtags.pl">shtags.pl</primary></indexterm> 242 <para>generates a tag file for Perl scripts.</para> 243 </listitem> 244 </varlistentry> 245 246 <varlistentry id="tcltags"> 247 <term><command>tcltags</command></term> 248 <listitem> 249 <indexterm zone="ch-system-vim tcltags"><primary sortas="b-tcltags">tcltags</primary></indexterm> 250 <para>generates a tag file for TCL code.</para> 251 </listitem> 252 </varlistentry> 253 254 <varlistentry id="view"> 255 <term><command>view</command></term> 256 <listitem> 257 <indexterm zone="ch-system-vim view"><primary sortas="b-view">view</primary></indexterm> 258 <para>starts <command>vim</command> in read-only mode.</para> 259 </listitem> 260 </varlistentry> 261 262 <varlistentry id="vim"> 263 <term><command>vim</command></term> 264 <listitem> 265 <indexterm zone="ch-system-vim vim"><primary sortas="b-vim">vim</primary></indexterm> 266 <para>is the editor.</para> 267 </listitem> 268 </varlistentry> 269 270 <varlistentry id="vim132"> 271 <term><command>vim132</command></term> 272 <listitem> 273 <indexterm zone="ch-system-vim vim132"><primary sortas="b-vim132">vim132</primary></indexterm> 274 <para>starts <command>vim</command> with the terminal in 132-column mode.</para> 275 </listitem> 276 </varlistentry> 277 278 <varlistentry id="vim2html.pl"> 279 <term><command>vim2html.pl</command></term> 280 <listitem> 281 <indexterm zone="ch-system-vim vim2html.pl"><primary sortas="b-vim2html.pl">vim2html.pl</primary></indexterm> 282 <para>converts Vim documentation to HTML.</para> 283 </listitem> 284 </varlistentry> 285 286 <varlistentry id="vimdiff"> 287 <term><command>vimdiff</command></term> 288 <listitem> 289 <indexterm zone="ch-system-vim vimdiff"><primary sortas="b-vimdiff">vimdiff</primary></indexterm> 290 <para>edits two or three versions of a file with <command>vim</command> and show differences.</para> 291 </listitem> 292 </varlistentry> 293 294 <varlistentry id="vimm"> 295 <term><command>vimm</command></term> 296 <listitem> 297 <indexterm zone="ch-system-vim vimm"><primary sortas="b-vimm">vimm</primary></indexterm> 298 <para>enables the DEC locator input model on a remote terminal.</para> 299 </listitem> 300 </varlistentry> 301 302 <varlistentry id="vimspell.sh"> 303 <term><command>vimspell.sh</command></term> 304 <listitem> 305 <indexterm zone="ch-system-vim vimspell.sh"><primary sortas="b-vimspell.sh">vimspell.sh</primary></indexterm> 306 <para>is a script which spells a file and generates the syntax statements necessary 307 to highlight in <command>vim</command>. This script requires the old Unix <command>spell</command> 308 command, which is provided neither in LFS nor in BLFS.</para> 309 </listitem> 310 </varlistentry> 311 312 <varlistentry id="vimtutor"> 313 <term><command>vimtutor</command></term> 314 <listitem> 315 <indexterm zone="ch-system-vim vimtutor"><primary sortas="b-vimtutor">vimtutor</primary></indexterm> 316 <para>teaches you the basic keys and commands of <command>vim</command>.</para> 317 </listitem> 318 </varlistentry> 319 320 <varlistentry id="xxd"> 321 <term><command>xxd</command></term> 322 <listitem> 323 <indexterm zone="ch-system-vim xxd"><primary sortas="b-xxd">xxd</primary></indexterm> 324 <para>makes a hex dump of the given file. It can 325 also do the reverse, so it can be used for binary patching.</para> 326 </listitem> 327 </varlistentry> 328 </variablelist> 95 <para>See testing</para> 329 96 330 97 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.