Difference between revisions of "Training/Linux - vi editor"

From HPC
Jump to: navigation , search
m (Pysdlb moved page Linux - vi editor to Training/Linux - vi editor without leaving a redirect)
m
Line 5: Line 5:
 
The vi editor is not intuitive, but once you get to know it, '''vi''' becomes a very powerful application.
 
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 [[training/Linux - command line|command line]] of how to invoke vi.
+
Below using the [[training/Linux - command line|command line]] are some examples:
  
  

Revision as of 10:20, 28 February 2017

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 using the command line are some examples:



[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)