I was thinking of setting my registers to equal common coding techniques. For example, I was thinking of doing this:
:let @i = "int i=0;"
Then I would set f
for for loop, w
for while loop etc. Is this a bad technique or is there a better way of doing this?
I think that you could use snippets instead. Try to look at snipmate plugin http://www.vim.org/scripts/script.php?script_id=2540
You can just type "inti TAB" and it'll expand to "int i=0;" if you wish.
It already has a lot of snippets to many languages but you can configure it to do what you want.