Training/Linux - vi editor

From HPC
Revision as of 10:14, 28 February 2017 by Pysdlb (talk | contribs) (Pysdlb moved page Linux - vi editor to Training/Linux - vi editor without leaving a redirect)

Jump to: navigation , search

Introduction

Linux has a large number of editors available to it which will match their preferences. The vi editor is installed on almost every Linux. Linux will very often install vim (vi improved) which is similar. Every command line user should know vi(m), because it is an easy tool to solve problems.

The vi editor is not intuitive, but once you get to know it, vi becomes a very powerful application.

Below is a few examples on the command line of how to invoke vi.



[username@viper ~]$ vi        (just start vi)
[username@viper ~]$ vi newfile.c    (start vi with a new file called newfile.c)
[username@viper ~]$ vi existing.c   (start vi with an existing file called existing.c)
[username@viper ~]$ vi existing1.c existing2.c  (start vi with a multiple files listed)