Home | Login and Logout | Basic Command Line Commands | File System | File Editing Through Terminal | Java Programs | Input/Output Redirection | Grep | Works Cited

The Vim Editor

Editing files through the linux terminal can be accomplished by using the vim editor. This is a text editor built into the linux machine.

Opening the Vim Editor

To create a java file and open it in the vim editor, you can type "vim filename.java", (filename being the name of the file you want to create). The file will be created in your current directory. If the file you want to edit already exists you must navigate to the directory it is located in and open it the same way as creating it("vim filename.java").


Once the file has been created the screen will look like the following image.


If the file already exists and has text within it, then the text will be displayed on the screen.

How to Edit Code in Vim

Key Commands to Edit in Vim Other Common Vim Commands

For any other command help in vim, feel free to use the command :help. This will display a full list of commands in vim.


Written by: Daniel Amusin, Derek DeCramer, Nikhil Thammadi