Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How not to give up on VIM?

Tags:

vim

editor

I have started to do some programming using VIM.
I have very mixed feelings so far. On one side I do love the idea, on the other - it is just hard to remember everything.

So I took the approach of learning while actually doing some stuff (for Ruby on rails development).
Unfortunately there is no chance in hell for me to be more productive as in other "conventional" text editor for now. And it seems it will take quite a lot of time to get used to VIM.

I noticed, that I often don't use VIM navigation/search&replace abilities, but instead just move around as I would do in other editors.

I am trying hard pushing myself not to open anything in other editors except VIM so I can learn it.

But, honestly, yesterday I gave up and did my last 20 minutes of coding in GEdit.

UPDATE: I want to say why I gave - just because of I would finish what I need faster (it was veeeery late and it was not the best time for learning VIM). And indeed I did enjoy using VIM. But I always had the "there must a better way of doing this" feeling and spent a lot of time finding that way.

So my question wold be: how can I learn and start using VIM more productively from day to day provided that I want to do some real coding when learning?

Thanks,
Dmitriy.

like image 919
Dmytrii Nagirniak Avatar asked Aug 19 '10 10:08

Dmytrii Nagirniak


People also ask

How do I stop Vim from saving and quitting?

Quit Vim / Vi without Saving the File To exit the editor, without saving the changes, switch to normal mode by pressing Esc , type :q! and hit Enter .

Is Vim still worth learning?

Increased productivityMost people who use vim say that it's worth learning as it improves your productivity. Tasks that usually require arrow keys to move around, such as copying and pasting lines of code from a few lines above, are much easier in vim.

Is Vim the most powerful editor?

Vim is extremely flexible and powerful. You can start simple and use it to edit configuration files quickly.


1 Answers

Keep the following in mind. While there are physical limits to the speed of your fingers, there seem to be few limits on the processing that your brain can perform. Therefore, the time you invest in learning vi(m)'s keyboard editing commands and shortcuts will be paid back handsomely over time as the speed with which you edit improves breaking the physical speed limits you would encounter when using a traditional editor. For instance, to delete the next five words in vi(m) you type 5dw and to insert 50 * characters you type 50i* ESC.

You can begin using vi(m) after learning very few commands: basic movement, inserting, changing, deleting, opening a new line, and saving a document. Coupling these commands together produces powerful combinations. As you master these, you'll be looking for more.

Print a vi reference sheet (like this, or this or this more extensive list), and keep it near you at all times.

like image 106
Diomidis Spinellis Avatar answered Sep 21 '22 06:09

Diomidis Spinellis