Creating Files

To create a file one must use an editor. There are a number of editors that are available. In order to know which ones are on your system, check with your System Administrator.


Use the man command to find out more details about these editors



Return to Main Menu | File Organization Menu | DOWN




vi: Getting Started

vi <filename> or vedit <filename> - starts a vi session with filename in the current buffer, in command mode

h, j, k, l
move the cursor left, down, up, or right respectively (can also use arrow keys)

i
insert text at cursor

a
insert text after cursor

x
deletes one character which the cursor is on

dd
deletes one entire line

<esc>
(escape key) - leave insert mode and reenter command mode

:q
quit (no changes were made)

:q!
quit and lose changes

ZZ or :wq
save changes, then quit

Command Mode: when type a colon while in VI

:
change from command mode to ed mode (cursor drops to bottom of screen)
:w filename <cr>

write the buffer contents to filename

:<line number>
Allows you to jump to that line in the text

: / <string>
finds the first occurrence of the string which is after the cursor's location




Return to Main Menu | File Organization Menu | UP