SHARE
Facebook X Pinterest WhatsApp

Linux.ie: VI Tutorial III

Written By
thumbnail
Web Webster
Web Webster
Jul 8, 2000

[ Thanks to Ken Guest
for this link. ]

“Some of the features that I am going to describe in this
tutorial are only available in version 5 of ViM – and even then
only if those features were enabled at compile time. To find out
what version you are using, and what the active feature set is, use
the :version command.
By using this command, vim will display
its version number and list the set of features that are available
with it. Features named with a ‘+’ in front were enabled at compile
time, those with a ‘-‘ were not.”

“The vimrc file is a plain text file which is looked at when you
start ViM. It is hidden under Linux, in that it is called ‘.vimrc’,
and kept in your home directory. The file is used to store commands
that you would otherwise have to type in each time that you start
up the editor. You can only have one command per line, and these
commands can be commented out with a double quote (‘”‘). For
example, most vimrc files will have ‘set wrapmargin=1’ in them
somewhere so that wordwrap is turned on automatically. With the
abbreviation command that I covered in the last tutorial you can
also use the vimrc file so that ViM will correct your more typical
spelling mistakes.”

“Over time, your vimrc file could grow to be quite big. It could
also get a bit complicated to keep it all in synch – especially if
you use vim on more than one machine and a portion of one vimrc is
machine specific and you don’t want to use an exact copy on the
other machine. There is a nice solution to this scenario, break
down the vimrc file into smaller files and use the ‘source’ command
in your vimrc file. The source command takes the form of ‘source ‘.
What it does is read that file and execute the commands that are in
it.”

Complete
Story

thumbnail
Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Recommended for you...

Red Hat reveals major enhancements to Red Hat Enterprise Linux AI
sjvn
Oct 22, 2024
How to Find AWS EC2 Instance Type Over SSH (6 Methods)
Benny Lanco
Sep 23, 2024
Crond: Daemon to Execute Scheduled Commands
Rose Hosting Blog
Sep 20, 2024
A Detailed Introduction to Oracle VirtualBox
Senthil Kumar
Sep 19, 2024
Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.