Vi Editor

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Vi Editor as PDF for free.

More details

  • Words: 240
  • Pages: 2
VI EDITOR There are two file modes 1)INSERT MODE: The insert mode puts anything typed on the keyboard into the current file 2)COMMAND MODE: The command mode allows the entry of commands to manipulate text.

i I a A r R <ESC>

Insert before current cursor position Insert at beginning of current line Insert (append) after current cursor position Append to end of line Replace 1 character Replace mode Terminate insertion or overwrite mode Deletion of text

Deleting x

delete character under cursor

dd

delete line under cursor

dw

delete word under cursor

ndd

Delete n lines (n is a number) and put them in buffer

db u

delete word before cursor Undo last command cut and paste

:w :w new.file

Write the current file. Write the file to the name 'new.file'.

:wq :q :q!

Write the file and quit. Quit. Quit with no changes.

:e filename

Open the file 'filename' for editing.

Cursor Movement h

move left (backspace)

j

move down

k

move up

l

move right (spacebar)

[return]

move to the beginning of the next line

Find Commands ?

finds a word going backwards

/

finds a word going forwards

f

finds a character on the line under the cursor going forward

F

finds a character on the line under the cursor going backwards Miscellaneous Commands .

repeat last command

u

undoes last command issue

:#

move to line #

:$

move to last line of file

MOVING

Related Documents

Vi Editor
November 2019 27
Vi Editor
November 2019 29
Vi Editor
October 2019 29
Vi Editor
November 2019 36
Vi Editor Commands
May 2020 13
Vi Editor Commands
November 2019 20