Vim: Difference between revisions

From SaruWiki
Jump to navigation Jump to search
m (added intro)
(using vim)
Line 9: Line 9:
==Installation and configuration==
==Installation and configuration==
When you install ''vim'', you also get ''xxd'', a tool to make a hexdump, or convert a hex dump back to it's original binary form.
When you install ''vim'', you also get ''xxd'', a tool to make a hexdump, or convert a hex dump back to it's original binary form.
==Using VIM==
Vim operates in 2 modus. A command mode and a insert mode. You start in command mode so almost every key is a command. You can switch to insert mode with ''i'' to return in command mode press ''esc'' or ( ''ctrl ['' )
Start in insert mode and typ some text. To save your progress return in command mode with ''esc'' Now we can use the ''ex-commands'' typ '':w'' to save the document. or use these commands.
:w  Save
:w 'filename' Save with this filename
:q  quit vim
:q! quit without save
:wq save and quit

Revision as of 11:56, 23 May 2008

Introduction

The screen-oriented text editor vim stems from vi, written in '76 for an early BSD Unix release by Bill Joy. vi is old, nonintuitive, and complex. vim stems from 1991, and stands for Vi IMproved, but its improvements do not lessen it's nonintuitivity or complexity.

So why do we feel that vim is an essential system tool? Well, it's because

  • vi can be found on just about any Linux and Unix system
  • vi is very powerful
  • with some practice, it's even usable.

Installation and configuration

When you install vim, you also get xxd, a tool to make a hexdump, or convert a hex dump back to it's original binary form.

Using VIM

Vim operates in 2 modus. A command mode and a insert mode. You start in command mode so almost every key is a command. You can switch to insert mode with i to return in command mode press esc or ( ctrl [ ) Start in insert mode and typ some text. To save your progress return in command mode with esc Now we can use the ex-commands typ :w to save the document. or use these commands.

:w  Save
:w 'filename' Save with this filename
:q  quit vim
:q! quit without save
:wq save and quit