paint-brush
Vim - 1 How to Open a File With Vim by@artwalker
118 reads

Vim - 1 How to Open a File With Vim

by Ethan WangJanuary 4th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Explore Vim commands: navigate, edit, and save files efficiently in Vim, from moving between lines to inserting text, all essential for seamless editing.

Company Mentioned

Mention Thumbnail
featured image - Vim - 1 How to Open a File With Vim
Ethan Wang HackerNoon profile picture

Use the Vim editor


vim filename.type


Use vim editor

Command mode


Command mode


  • :1 - Go to the first line


Go to the first line


The result of that command


  • :$ - Go to the last line


 Go to the last line


The result of that command

  • :number - Go to the line that you want to go


 Go to the  tenth line

Insert mode


  • i - Enter the insert mode, you can type the text whatever you want


Enter the Insert mode


Enter some text


  • Esc - back to command mode from insert mode


Exit from Insert mode


  • :w - Make the text you type into the document


Save what you type


The result of that command


  • :q - Quit the vim editor


Exit from Vim editor


Back to the terminal