Home > How To, Raspberry pi, Technology > Introduction to Vi Text Editor for Raspberry pi users

Introduction to Vi Text Editor for Raspberry pi users

October 14, 2012 Leave a comment Go to comments

When working with the raspberry pi I have come across the Vi Text Editor which is completey different to the nano so here is a quick introduction to the Vi text editor.

It is important to remeber there are two modes in Vi theses are Insert-text mode and Command mode

To enter the Vi text editor you need to do the following

Vi (name of file)

Assuming you did not already have a file this command will create one

To start putting text into your file you need to do the following

Type the letter i (it stands for “insert-text mode”),

At the end of each line of text you will need to press the return key for a new line

When finshed push the ESC key to end insert-text mode

To edit a line or move the cusor within a  file in Vi text editor we first need to be in command mode and type

/(word looking for)

((ie /re) would move the cursor to the first instance of re)

Then push i to enable insert-text mode

When finshed push the ESC key to end insert-text mode and go back to command mode.

When you exit insert-text mode you will change to the command mode

To save a file and exit VI type ZZ (note the capitals).

  1. October 21, 2012 at 2:28 am

    The weird thing about vi is, I haven’t used it since 1985, but as soon as I started it up, muscle memory came back and I could remember all the old commands. I have installed emacs on my pi, but it’s very slow to load – because emacs is huge. nano is nice and quick to load, but the commands are so non-intuitive. I mean every PC or Mac editor uses Ctrl (or Command) C for cut, V for paste, X for delete, so nano, why would use use Ctrl-K and Ctrl-U. And how can Ctrl-O ever mean save? Was the developer just trying to be obscure?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


The University of Glasgow's Raspberry Pi Project


Your all round solution for tech problems (and some others things...like spelling errors)

Raspberry Pi Kid

Adventures with Raspberry Pi

Naked Security

Computer Security News, Advice and Research

Dustin Software

Because programming is fun!

Pinoy Tekkie



Fun stuff for technics enthusiasts


Tech, Gadgets, Photography, Social Media and Poor Spelling

Programming My Rasberry Pi

A brave fool's adventures into the unknown!

Chris Ainger's Blog

Where Fishing Meets Computing


Information wants to be free

ITtechExec: Protecting Tech Careers Since 2001

Technical Career Advancement: Transformed. Guaranteed.


An Exclusive Web 2.0 Startups Review Blog

The Life of Me

Just another IT blog

%d bloggers like this: