|
Softpanorama
(slightly skeptical)
Open Source Software Educational Society |
May the
source be with you,
but remember the KISS principle ;-)
|
VIM Configuration
By default, vim runs in vi-incompatible
mode. This may be new to users who have used other editors in the past.
The “nocompatible” setting is included below to highlight the fact that
a new behavior is being used. It also reminds those who would change to
“compatible” mode that it should appear first. This is necessary because
it changes other settings, and overrides must come after this setting. Create
a default vim configuration file by running
the following:
cat > vimrc.new << "EOF"
" Begin /etc/vimrc
set nocompatible
set backspace=2
syntax on
if (&term == "iterm") || (&term == "putty")
set background=dark
endif
" End /etc/vimrc
EOF
install -m644 vimrc.new /etc/vimrc
The set nocompatible makes
vim behave in a more useful way (the default)
than the vi-compatible manner. Remove the “no” to keep the old
vi behavior. The
set backspace=2 allows backspacing over line breaks, autoindents,
and the start of insert. The syntax on
enables vim's syntax highlighting. Finally, the if statement with
the set background=dark corrects
vim's guess about the background color
of some terminal emulators. This gives the highlighting a better color scheme
for use on the black background of these programs.
Documentation for other available options can be obtained by running
the following command:
vim -c ':options'
Contents of Vim
Installed programs: efm_filter.pl, efm_perl.pl, ex (link
to vim), less.sh, mve.awk, pltags.pl, ref, rview (link to vim), rvim (link
to vim), shtags.pl, tcltags, vi (link to vim), view (link to vim), vim,
vim132, vim2html.pl, vimdiff (link to vim), vimm, vimspell.sh, vimtutor,
and xxd
Short Descriptions
|
efm_filter.pl |
A filter for creating an error file that can be read by
vim |
|
efm_perl.pl |
Reformats the error messages of the Perl interpreter for use
with the “quickfix” mode of vim
|
| ex
|
Starts vim in ex mode |
| less.sh
|
A script that starts vim with
less.vim |
| mve.awk
|
Processes vim errors |
|
pltags.pl |
Creates a tags file for Perl code for use by
vim |
| ref
|
Checks the spelling of arguments |
| rview
|
Is a restricted version of view;
no shell commands can be started and view
cannot be suspended |
| rvim
|
Is a restricted version of vim;
no shell commands can be started and vim
cannot be suspended |
|
shtags.pl |
Generates a tag file for Perl scripts |
| tcltags
|
Generates a tag file for TCL code |
| view
|
Starts vim in read-only mode
|
| vi
|
Is the editor |
| vim
|
Is the editor |
| vim132
|
Starts vim with the terminal
in 132-column mode |
|
vim2html.pl |
Converts Vim documentation to HypterText Markup Language (HTML)
|
| vimdiff
|
Edits two or three versions of a file with
vim and show differences |
| vimm
|
Enables the DEC locator input model on a remote terminal
|
|
vimspell.sh |
Spells a file and generates the syntax statements necessary
to highlight in vim. This script
requires the old Unix spell command,
which is provided neither in LFS nor in BLFS |
|
vimtutor |
Teaches the basic keys and commands of
vim |
| xxd
|
Creates a hex dump of the given file; it can also do the reverse,
so it can be used for binary patching |
Copyright © 1996-2009 by Dr. Nikolai Bezroukov.
www.softpanorama.org was
created as a service to the UN Sustainable Development Networking Programme (SDNP)
in the author free time.
Submit
comments This document is an industrial compilation designed and created
exclusively for educational use and is placed under the copyright of the
Open Content License(OPL).
Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made
for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
- The statements, views and opinions presented on
this web page are those of the author and are not endorsed by, nor do they necessarily
reflect, the opinions of the author present and former employers, SDNP or any other
organization the author may be associated with.
- We do not warrant the correctness of the information provided or its
fitness for any purpose
- In no way this site is associated with or endorse cybersquatters
using
the term "softpanorama" with other main or country domains (e.g. softpanorama.com) with
bad faith intent to profit from the goodwill belonging to
someone else.
Last modified:
August 14, 2009