> For the complete documentation index, see [llms.txt](https://asafahmadov.gitbook.io/cloud-and-devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asafahmadov.gitbook.io/cloud-and-devops/devops-bootcamp/operating-system-usd-linux-basics/working-with-vim-editor.md).

# Working with Vim Editor

#### What is vi/vim ?

&#x20;  ▪ Vi and Vim are built-in text editors in Linux&#x20;

&#x20;  ▪ Vi is by far the most distributed and used text editor in Linux&#x20;

&#x20;  ▪ Depending on your Linux distro, Vim may or may not be installed

&#x20;  ▪ Vim (Vi IMproved) is an improved version of Vi&#x20;

&#x20;  ▪ Built to make creating and changing any kind of text very efficient&#x20;

#### Use cases

&#x20;  ▪ Small modifications can be faster, especially when you are currently working in the CLI&#x20;

&#x20;  ▪ Faster to create and edit at the same time&#x20;

&#x20;  ▪ Supports multiple formats&#x20;

&#x20;  ▪ When working on a server

![](https://2601183865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8QpIzz6VwCOTMwaqKYa3%2Fuploads%2FMLenMEwjkGr4DbktOERT%2Fimage.png?alt=media\&token=594d1f74-7879-433b-83e4-66a59a076a64)

### Working with Vim

Vim has 2 modes:

&#x20;  ▪ Command Mode

&#x20;  ▪ Insert Mode

#### Command Mode

&#x20;  ▪ This is the default mode&#x20;

&#x20;  ▪ You can't edit the text&#x20;

&#x20;  ▪ Whatever you type is interpreted as a command&#x20;

&#x20;  ▪ Navigate, Search, Delete, Undo, etc.

![](https://2601183865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8QpIzz6VwCOTMwaqKYa3%2Fuploads%2FmTWjiBSjm6hh73PAnkXh%2FScreen%20Shot%202022-05-08%20at%2020.03.39.png?alt=media\&token=47d75d23-9d2b-4e8e-b65e-10b1525a2648)

#### Insert Mode

&#x20;  ▪ Allows you to enter text&#x20;

&#x20;  ▪ Pressing Escape, switches you back to command mode
