My Tech notes: Useful Vi Editor Trick

Unix Documentation

Free Online Unix Training Materials

Lists many links to free Unix training materials.

Pointers and Arrays Materials

Pointers and Arrays materials Explained for C beginners

C FAQ and General Questions C Interview Questions

Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, February 18, 2009

Useful Vi Editor Trick

Here is yet another Vi editor trick. At the Vi editor, we can edit multiple files by switching between them (With out opening another terminal)

$vi ex1.c ex2.c ex3.c

To switch one file to another use :n, :#e (With out exiting and opening the file)
like $vi ex1.c ex2.c ex3.c

:n Move forward to next file is the file list
:e# Toggle between the last two edited files
:rew Rewind file list and reopen first file in the list

No comments:

Post a Comment