Question

There are thousands of vi tutorials on the web, most of them generically listing all the commands. There are even videos on youtube which show basic functionality.

But does anyone know of a vi tutorial which focuses on the needs of programmers?

For example when I program in Perl with vi, moving to the "next paragraph" is meaningless.

I want to know which commands seasoned vi users combine to e.g:

  • copy everything inside of parentheses
  • copy a function
  • copy and paste a variable (e.g. 2yw)
  • etc.

I am sure there are lots of functions using multiple-file capability, and the maps, macros, reading in of files for template code, regular expression search, jumping to functions, perhaps minimal code completion, or other features that emulate what programmers have gotten used to in Visual Studio and Eclipse, etc.

Was it helpful?

Solution

A nice collection of vimtips.

And the best Vim cheatsheet around.

OTHER TIPS

I just ended up reading the vim manual a few times, over the years, picking up useful features on each iteration.

One thing that really made vim work for me as a perl IDE was starting to use tags, as explained here: http://www.vim.org/tips/tip.php?tip_id=94. Using the pltags script that ships with vim, you can jump around between modules to find your functions, methods, etc.

If you are a beginner, vimtutor would be a good way to start with. (Type vimtutor on your shell and get going).

And once you get hold of the basics of vim, you can look around web and figure out things for yourself.

This and this may be an interesting read.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top