Original link: https://wangpei.net/2022/09/12/why-i-devote-into-vim/
Vim is a text editing software. In my impression, it is almost as old as a computer (in fact, it is not that old). The programmers I know regard it as a programming artifact. I also have a friend Zhang Erning, who even used it to Read documents, read novels. He also taught me a lot of vim skills, but unfortunately I can’t find the notebook to record these secrets. I will look for it in a few days.
I am obsessed with Vim because after using all kinds of text editing software, Markdown writing software, and note-taking software, I just want to return to the essence of writing, face a screen, concentrate, and let the speed of typing catch up with thinking speed. And Vim’s slogan is “write at the speed of thought”.
The invention of Vim is based on the idea that repetitive tasks should be left to machines.
So Vim strictly separates the input interface (Insert mode) from the editing interface (Normal mode) where the cursor wanders. It looks stupid, but it’s actually very smart. Because we are operating text editing, a lot of cursor movement is inefficient. The frequent Backspace key, constantly moving the cursor (whether with the keyboard or with the mouse), is as fierce as a tiger in one operation.
The clever thing about Vim is that through the combination of various commands, it can quickly complete operations that ordinary text editing software can’t do. For example to delete a line of text:
I am the text to be deleted
With ordinary text editing software, there are two ways:
- Move the cursor to the end of the sentence and use Backspace to delete word by word.
- Select this paragraph with the mouse, and then delete it with the Delete key.
Either way, multiple operations are required.
With Vim, you only need to move the cursor to this line, and then enter
dd
That’s it. In fact, dd is a cut command. The cut content is also stored on the clipboard. You can paste it elsewhere. If you delete it wrong, just enter
u
can be restored.
Is not it simple? Are you excited?
This is just a little scratching the surface of what I’m a beginner, Vim is more powerful than I thought.
Vim has a wealth of plugins. The method of installing plugins is very simple. Just find the plugin and write the configuration file .vimrc.
I configured Vim with the WordPress plugin so that I can update the blog without leaving the Vim window. I also installed the Twitter plugin and tweeted in Vim, and it felt really nice and elegant.
The key is that these operations are all done under the Vim interface, which completely eliminates the distraction problem caused by constantly switching applications.
In the past, if I wanted to send Twitter, I had to log in to the browser or app, so I couldn’t help being attracted by the information flow. Now I am facing a dark window (I used Dark mode), and I will never split it again. Heart.
Since Vim is so good, why not promote it to liberal arts students and writers? I’d like to promote it, but Vim has a really steep learning curve and a bit of a high barrier to entry, and not everyone has the determination to learn and master it. But I believe that once you enter the gate of Vim, there is a powerful magic that draws people into it.
Of course, Vim is just one of many software, and using Vim is not at all contradictory to using other writing software. My friend Zhang Yuxin put forward a concept called “Evaluate equipment while using it lightly”, which means don’t expect a software to solve all your problems, no matter how heavy the weapon is, you should use it gently, just use its most special and best functions well can. We need to combine tools to build a peaceful orchard in our hometown.
This is the class of my Vim recruits, which is laughing at the Fang family. Welcome everyone to give me some advice.
15 total views, 15 views today
This article is reprinted from: https://wangpei.net/2022/09/12/why-i-devote-into-vim/
This site is for inclusion only, and the copyright belongs to the original author.