Richard,

You might want to look at an imap rather than an abbreviation.
For example,
:imap \c #include <stdio.h><CR>int main(int argc, char **argv)<CR>{<CR><CR>}<Up>
would give you the following...

#include <stdio.h>
int main(int argc, char **argv)
{

}

with your cursor placed on the blank line between the braces.  Alternately, you
could use <ESC> in your mapping and at that point you'd be in normal mode and
you could use h,j,k,l and any other normal vim movement to place your cursor.
The benefit to using a mapping rather than an abbreviation is, at least for me,
you don't have to ^V and I believe an abbreviation will only be triggered once
you type a space at the end of it.  Hope this helps.

-dan

Reply via email to