vim command

Vim Editor: How to Correct Spelling Mistakes Automatically

by Ramesh Natarajan on March 12, 2009

Vim Automatic Typo Correction
Photo courtesy of shandrew

This article is written by SathiyaMoorthy.

This article is part of the ongoing Vi / Vim Tips and Tricks Series. I tend to make simple spelling mistakes while writing, as English is not my first language. Wouldn’t be nice if Vim editor can do the spelling correction automatically as you make a typo?

Note: I wish someone from Nayv Navy football team read this article. Oh well, that would’ve still not fixed their problem.

In this article, let us review how to correct spelling mistakes automatically inside Vim editor.

(more…)

8 Essential Vim Editor Navigation Fundamentals

by Ramesh Natarajan on March 6, 2009

Vim Vi Editor Navigation Fundamentals
Photo courtesy of Håkan Dahlström

This article is written by SathiyaMoorthy.

This article is part of the ongoing Vi / Vim Tips and Tricks series. Navigation is a vital part of text editing. To be very productive, you should be aware of all possible navigation shortcuts in your editor. In this article, let us review the following 8 Vi / Vim navigation options.

  1. Line navigation
  2. Screen navigation
  3. Word navigation
  4. Special navigation
  5. Paragraph navigation
  6. Search navigation
  7. Code navigation
  8. Navigation from command line

(more…)

Vim - Macro, Mark & MapThis article is written by SathiyaMoorthy

This article is part of the ongoing Vi / Vim Tips and Tricks series. There are 3 powerful M’s in VIM — Macro, Mark, and Map. Each is intended for a separate job.

  1. Macro for recording a job and repeating it.
  2. Mark for bookmarking a particular position in a file and then coming back to it.
  3. Map for mapping a job to a key, and then executing that job by that key.

In this article, let us look at various features of Vim’s Macro, Mark and Map along with practical examples.
(more…)

Vi and Vim Macro Tutorial: How To Record and Play

by SathiyaMoorthy on January 16, 2009

Vim Macros - Record and Play
Using Vim Macro feature you can record and play a sequence of actions inside the editor.

This article explains how to perform record and play inside Vi and Vim editor using two detailed examples.
(more…)

Vim Word Completion Tips and Tricks
Photo courtesy of Dominik Gwarek

This is a guest post written by SathiyaMoorthy

You can perform automatic word completion in Vim using Ctrl-x in insert or append mode. By typing the first few characters of a word you can get the whole word either from a dictionary, or a thesaurus, or even the words that are already present on the file that you are editing.

This article explains how to perform following operations with examples and screen shots:

  1. Word / pattern completion
  2. Line completion
  3. Dictionary word completion
  4. File name completion
  5. Filling up words with similar meaning (Thesaurus word completion).

(more…)

Vim Editor LogoThis is a guest post written by Lakshmanan G.

This article is part of the ongoing Vi / Vim Tips & Tricks series. Using autocommand feature in Vi / Vim, you can specify some Vim commands to be executed automatically while reading or writing a file, or while entering/leaving a buffer/window, or while exiting Vim.

In this article, using 3 simple steps, let us review how to use this powerful autocmd feature of Vim to create a header section inside a file (for example, header in a C programming code) with file name, creation date, last modified date/time automatically populated when you open a file in vi.
(more…)

Vi and Vim Editor: 3 Steps To Enable Thesaurus Option

by Ramesh Natarajan on December 16, 2008

Vi or Vim Thesaurus
Photo courtesy of dantesz

This is a guest post written by SathiyaMoorthy.

Enabling thesaurus option for vi / vim will help you to choose alternate words from thesaurus. For example, while typing “important”, you may prefer to use a different word than “important”.  Wouldn’t be nice if vi can give you few alternative words such as: “valuable” or “substantial” or “significant”?

This article explains how to use vi / vim effectively by enabling thesaurus option in three steps.
(more…)