ホーム > BasicOperations > Basic Vim Operations for Use on EC2 and Similar Platforms
BasicOperations

Basic Vim Operations for Use on EC2 and Similar Platforms

Thank you for your continued support.
This article contains advertisements that help fund our operations.

Minimum Vim Operations for Use in EC2 and Other Instances

What is Vim

Vim is a text editor that can be operated in the terminal.

When you need to manipulate files on EC2 or other instances, you generally end up using Vim, so many people use it reluctantly.

There seems to be a certain number of people in the world who write code in Vim, and when the word "vim" is mentioned to them, it triggers a discussion about Vim for several hours or not at all.

This article is intended for those who use Vim reluctantly. The author prefers VSCode.

Editing and Creating Files

It's very simple.

vim filename

You can edit existing files or create new ones if the file does not already exist.

For example, on the Desktop:

vim test

Typing this will create a file named test on which you can write.

vim image

Vim Operation Methods

In my article, I will write only the absolute minimum necessary, so if you want more details, I recommend reading this article.

Vim can be divided into Insert mode and everything else.

In the "everything else" mode, you search for the editing location, and in Insert mode, you perform the editing.

There are a few ways to enter Insert mode, but I personally use the "a" key.

After entering Insert mode, type your text as needed. Press ESC to exit Insert mode.

To save changes, type:

:wq

You will see the input at the bottom.

You can quit without saving changes with just ":q". However, if there are changes that need to be saved forcibly, you will need to enter:

:!q

This allows you to forcefully quit even with changes made.

By following these steps, you can save your changes.

Searching for Specific Text

When not in Insert mode, you can search for a specific word by typing:

/searchword

This is useful when working with configuration files, etc.

Conclusion

That concludes the article on the minimal Vim operations.

I often use Vim to work in my own articles, so I hope this article serves as a helpful reference for your operations.

Please Provide Feedback
We would appreciate your feedback on this article. Feel free to leave a comment on any relevant YouTube video or reach out through the contact form. Thank you!