MagLite Solitaire Single AAA Cell Flashlight

The perfect technician's flashlight
Click Here!
: : : : : : : :    h o m e   :|:   A l l   i n   G e n e r a l   O u t d o o r s   :|:   M a g l i t e   S a l e s   :|:   m y   r e s u m e   
 L i n u x H e l p  : : : : : : : :

VI Editor quick reference

The vi editor is often looked at as archaic and difficult to learn, but it is in fact, rather simple if you know the main commands to use. This tutorial will teach you nearly everything you will ever need to know about the vi editor.

vi editor usage: vi filename
If the file does not exist, it will be created for you.

There are three modes of vi that you need to understand.
command mode - used to give commands to the editor
input mode - used to input text
ex mode - denoted by typing a : from command mode.
When you execute vi, you start in command mode and must tell vi what you want to do before inputting text.

Quick Reference for vi editor commands. Any command the ends in <esc>is a command that will put you into a specific mode until <esc> is pressed to back you out to command mode. If at any time you forget what mode you are in, or you get lost by typing the wrong character, you can press <esc> twice to ensure that you are in command mode.

i - insert before cursor <esc>
I - insert at beginning of line <esc>
a - append (add) text after cursor <esc>
A - append text at end of line <esc>
x - delete one character at the current cursor position
r - replace a single character at the cursor
R - replace characters until <esc> is pressed
#d - delete # of lines
dd - delete current line
D - delete remainder of line after cursor


Quick Reference for ex mode commands

:w - write the current buffer to the file
:w filename - write the buffer to filename
:w! - write to a read-only file
:wq - write and quit the editor
:q - quit the editor
:q! - force quit if :q doesn't work (modified, but don't want to save changes)
:%s/string/newstring/g - replace 'string' with 'newstring' globally

A more in-depth tutorial can be found at http://www.eng.hawaii.edu/Tutor/vi.html.

I certainly hope this helps! If you see anything that is in error or needs to be added, please let me know ;-)

To learn more about the VI Editor, check out these books at Amazon.com.

cover     cover
 L i n u x   W o r l d   N e w s   : : : : : : : :


What in the hell is a KrnlPanic? Well, a KrnlPanic is me! Actually, let's start with "What is a kernel?". The kernel is the core of your operating system (OS), whether your OS is Linux, Unix or windows. The kernel takes care of all process management (what program runs and when), memory management (which parts of memory get used for what) and also, the kernel takes care of interfacing the OS with your computer's hardware (disk drives, sound card, modem, network card, etc).

Now...since the kernel is doing all of these extremely important jobs, it stands to reason that if it has an error, it will be a Bad Thing(tm). If you use windows, you know a kernel panic as a "BSOD" or Blue Screen of Death. Or how about "Invalid Page Fault in KERNEL32.DLL". I'm sure you've probably seen both of those. In Linux, a Kernel Panic is normally plainly stated so. At boot time is when you will see most linux panics. I have yet to see a linux kernel panic while the system is running. You may have seen "Kernel Panic: init not found" or "Kernel Panic: VFS unable to mount root fs on 2:00". All of these previously listed errors are because of something that happened to the kernel that it couldn't handle, whether it was an access to an invalid memory location or the inability to find the initialization files it requires.

I hope that sufficiently explains things. Oh yeah...KrnlPanic is also my name ;-)

- Rick

 S l a s h d o t / F r e s h m e a t   : : : : : : : :
Slashdot and Freshmeat Headlines at 1283544111 (Unixtime)

Slashdot.org Home

o New and Old Experiments Combine To Help the Search For Life On Mars
o NVIDIA Announces New Line of Fermi-Based Mobile Chips
o Where Does Dell Go After Losing 3Par?
o Anti-Google Video Runs In Times Square
o The Push For Colbert's "Restoring Truthiness" Rally
o <em>Duke Nukem Forever</em> Back In Development
Freshmeat.net Home

Freshmeat headlines seem to be having problems. Will get this working again soon.
 
Search Slashdot:
Search Freshmeat:
Search for linux books or other merchandise @ Amazon.com

Search:
Keywords:
In Association with Amazon.com

Google
: : : : : : : :  K r n l P a n i c   : : : : : : : :
Disclaimer: The documents on this site are to be taken as-is, and I accept no responsibility for damages that may occur from errors or omissions in any of the documents on this site or referred to by this site. By using any of these help documents, you agree to this disclaimer.          ***This site best viewed at 1024x768 or better screen resolution.***