How to Master Vim

Vim is a text editor that I use every day. It’s a program that most people know about, but not many mastered.Here are some tips and tricks to get you started.

Vim is part of the UNIX family of programs, which means that it’s an old program with a lot …


This content originally appeared on DEV Community and was authored by PythonBasics

Vim is a text editor that I use every day. It's a program that most people know about, but not many mastered.Here are some tips and tricks to get you started.

Vim is part of the UNIX family of programs, which means that it's an old program with a lot of history and power. Vim is not just a text editor, it's a "programmer's editor". That means it has some pretty advanced features under the hood.

First thing you need to do is get Vim installed on your computer, where I will assume that you are using Linux. If not, you can download it at vim.org

One thing to know about vim is that it's keyboard oriented.

Every function has a keyboard shotcut. For example:

  • To quit without saving, press ZQ.
  • To save press ESC :w
  • To start typing press i
  • To go back to option mode, press ESC

And so in order to master vim, you need to master the keyboard shortcuts.

To start learning vim, this tutorial is a good staring point. It takes you from beginner to master level.

Alternatively, you can grab a cheat sheet and start editing text. But that can be a frustrating process, as you will need to learn the keyboard shortcuts while at the same time doing your work.

Why vim?

As software developers, we often spend all day inside looking at computers and writing code.

So many people like me start a terminal to type vim. The reason is that vim is a good tool. Users can edit files, run simple shell commands, compile programs

What makes the tool good? I created some list of features that are very important for me:

  • Fullscreen is the best way to focus. How to close windows, how to maximize them, how to split them - you don't need to think about how to use vim.

  • Keyboard control because as a coder your hands are already on the keyboard. You can just do everything what you need with keyboard. It's similar to "Windows" keyboard shortcuts, but much more powerful.

  • Keyboard macros easily record and replay keystrokes. This feature saves you a lot of time


This content originally appeared on DEV Community and was authored by PythonBasics


Print Share Comment Cite Upload Translate Updates
APA

PythonBasics | Sciencx (2021-08-22T13:50:08+00:00) How to Master Vim. Retrieved from https://www.scien.cx/2021/08/22/how-to-master-vim/

MLA
" » How to Master Vim." PythonBasics | Sciencx - Sunday August 22, 2021, https://www.scien.cx/2021/08/22/how-to-master-vim/
HARVARD
PythonBasics | Sciencx Sunday August 22, 2021 » How to Master Vim., viewed ,<https://www.scien.cx/2021/08/22/how-to-master-vim/>
VANCOUVER
PythonBasics | Sciencx - » How to Master Vim. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/22/how-to-master-vim/
CHICAGO
" » How to Master Vim." PythonBasics | Sciencx - Accessed . https://www.scien.cx/2021/08/22/how-to-master-vim/
IEEE
" » How to Master Vim." PythonBasics | Sciencx [Online]. Available: https://www.scien.cx/2021/08/22/how-to-master-vim/. [Accessed: ]
rf:citation
» How to Master Vim | PythonBasics | Sciencx | https://www.scien.cx/2021/08/22/how-to-master-vim/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.