mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
Update /etc/vimrc to set defaults properly
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11358 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
73b3eb9fe5
commit
173aea3c22
@ -45,6 +45,9 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>2018-01-30</para>
|
<para>2018-01-30</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>[bdubbs] - Make /etc/vimrc set defaults properly.</para>
|
||||||
|
</listitem>
|
||||||
<listitem revision="systemd">
|
<listitem revision="systemd">
|
||||||
<para>[dj] - Update to systemd-237. Fixes
|
<para>[dj] - Update to systemd-237. Fixes
|
||||||
<ulink url="&lfs-ticket-root;4203">#4203</ulink>.</para>
|
<ulink url="&lfs-ticket-root;4203">#4203</ulink>.</para>
|
||||||
|
@ -128,9 +128,13 @@ done</userinput></screen>
|
|||||||
<screen><userinput>cat > /etc/vimrc << "EOF"
|
<screen><userinput>cat > /etc/vimrc << "EOF"
|
||||||
<literal>" Begin /etc/vimrc
|
<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 nocompatible
|
||||||
set backspace=2
|
set backspace=2
|
||||||
set mouse=r
|
set mouse=
|
||||||
syntax on
|
syntax on
|
||||||
if (&term == "xterm") || (&term == "putty")
|
if (&term == "xterm") || (&term == "putty")
|
||||||
set background=dark
|
set background=dark
|
||||||
@ -138,9 +142,7 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
" End /etc/vimrc</literal>
|
" End /etc/vimrc</literal>
|
||||||
EOF
|
EOF</userinput></screen>
|
||||||
|
|
||||||
touch ~/.vimrc</userinput></screen>
|
|
||||||
|
|
||||||
<para>The <parameter>set nocompatible</parameter> setting makes
|
<para>The <parameter>set nocompatible</parameter> setting makes
|
||||||
<command>vim</command> behave in a more useful way (the default) than the
|
<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>
|
<command>vi</command> behavior. The <parameter>set backspace=2</parameter>
|
||||||
setting allows backspacing over line breaks, autoindents, and the start of
|
setting allows backspacing over line breaks, autoindents, and the start of
|
||||||
insert. The <parameter>syntax on</parameter> parameter enables vim's syntax
|
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
|
proper pasting of text with the mouse when working in chroot or over a
|
||||||
remote connection. Finally, the <emphasis>if</emphasis> statement with the
|
remote connection. Finally, the <emphasis>if</emphasis> statement with the
|
||||||
<parameter>set background=dark</parameter> setting corrects
|
<parameter>set background=dark</parameter> setting corrects
|
||||||
<command>vim</command>'s guess about the background color of some terminal
|
<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
|
emulators. This gives the highlighting a better color scheme for use on the
|
||||||
black background of these programs.</para>
|
black background of these programs.</para>
|
||||||
|
<!--
|
||||||
<para>Creating an empty <filename>~/.vimrc</filename> prevents vim from
|
<para>Creating an empty <filename>~/.vimrc</filename> prevents vim from
|
||||||
overriding settings in <filename>/etc/vimrc</filename> by using
|
overriding settings in <filename>/etc/vimrc</filename> by using
|
||||||
<filename>/usr/share/vim/vim80/defaults.vim</filename>.</para>
|
<filename>/usr/share/vim/vim80/defaults.vim</filename>.</para>
|
||||||
|
-->
|
||||||
<para>Documentation for other available options can be obtained by
|
<para>Documentation for other available options can be obtained by
|
||||||
running the following command:</para>
|
running the following command:</para>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user