Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Faster with Vim Shortcuts! #16

Open
abdulrcs opened this issue Apr 1, 2024 · 0 comments
Open

Code Faster with Vim Shortcuts! #16

abdulrcs opened this issue Apr 1, 2024 · 0 comments

Comments

@abdulrcs
Copy link
Owner

abdulrcs commented Apr 1, 2024


slug: code-faster-with-vim-shortcuts
date: 18-Jul-2022
summary: Never leave your hands on your keyboard again.
readingTime: 2 min read
image: https://github.com/abdulrcs/abdulrahman.id/assets/54136956/5904b120-7001-4a93-952d-534c4a774a08

What is Vim?

Vim is a text editor that runs in the Terminal on systems like Linux. You can use Vim with the command vim (filename) in Linux, or you can also use WSL in the Windows Terminal. But in this article, we will discuss Vim as a shortcut rather than as a text editor as a whole, because we can also use Vim shortcuts in Visual Studio Code. We will learn the basics of Vim shortcuts and how you as a programmer can navigate through code and become faster and more productive.

Vim Logo

Why Vim?

Reasons why people use Vim:

  • Its very useful shortcuts
  • Reduces movement of hands from keyboard to mouse
  • Faster navigation in code

VIM memes

Vim Shortcuts

Vim Shortcuts

The above image is a summary of the shortcuts available in Vim, it looks like a lot, but one of the cool things about Vim is that you can start thinking inside Vim.

Vim is set up to function like a language, consisting of verbs, adjectives, and nouns.
Vim summary

For example, we can change the contents of an HTML tag by "changing inside tag" or c i t.

change inside tag

Starting to Use Vim

One of the reasons people don't use Vim is because they don't get the features in VScode. We can get the benefits of VSCode & Vim Shortcuts with the Vim extension in Visual Studio Code.

Vim extension

To learn Vim shortcuts, we can use vimtutor. If we use Linux we can use the vimtutor command to open it. Or we can just copy the text from here and open it in Visual Studio Code.

Vim tutor

Above is the image of the contents of vimtutor, it's just a text file that contains the basics of Vim shortcuts, we can navigate through this vimtutor file until the end in about 25-30 minutes.

It takes a little practice to feel confident in using Vim shortcuts, but later on, you will be able to code faster and more accurately than before, go and try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant