As I develop more with vim, I am in a copy of the code of useful code, similar to the "templates" in Eclipse.
I was thinking of creating a separate file for each piece of code and just reading them with
:r code-fornext
but it just seems primitive. Googling around I find vim macros mentioned and something about "maps", but nothing seems simple.
What I'm looking for, for example, is something like Eclipse "Templates", so I insert a piece of code with the cursor sitting in the middle of it. Or JEdit "Macros", which I can write, doing complex deletions and renaming on one line, then I can play it again on 10 other lines so that it does the same with them.
Does vim have something like these two functions?
source
share