Frage

I have been using vim for a few days now and I really like the key bindings and the separate modes. I would really like to be able to be a little more efficient when using the various shortcuts etc.. that it has to offer.

For example I got a vim extension for visual studio and I had this line of code:

SqlCommand sqlcmd = new SqlCommand();

I wanted to get into the braces so I tried 5W, this took me to the first brace, then I pressed 'L' to go in and 'I' to go into insert mode.

I don't feel that I am using it to its potential, does anyone have any suggestions as to a quicker way they would have done that? or suggest things that I can look at to get even more efficient at editing using what vim has to offer, I would be really grateful.

War es hilfreich?

Lösung 2

if your cursor is before the () on that line, you can try pressing:

%i

I think it would be the best way to go there. Of course you could do this as well:

f(a

to the question "how to get more productive"

  • think about those operations, you thought "complex/not productive" (like the one in your question)
  • try to find out a better solution by google/vim help/doc
  • use the new solution in your daily edit
  • if you cannot find better solution, ask here or other vim community, like vim-use mailing list.

Andere Tipps

Those two cheat-sheets will get you pretty far:

enter image description here

enter image description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top