cpp.vim (472B)
1 augroup CppIAbbrevs 2 autocmd! 3 autocmd FileType c,cpp :iabbrev main@ int main(int argc, char* argv[]) {<cr><cr>}<up> 4 autocmd FileType c,cpp :iabbrev fun@ <esc>bvedivoid <C-o>P() {<cr><cr>}<up> 5 autocmd FileType c,cpp :iabbrev p@ printf("\n");<esc>4hi 6 autocmd FileType c,cpp :iabbrev r@ return;<left> 7 autocmd FileType c,cpp :iabbrev i@ #include <><left> 8 autocmd FileType c,cpp :iabbrev for@ <esc>bvedifor(int <c-o>P=0; <c-o>P < n; <c-o>P++) {<cr><cr>}<up> 9 augroup END 10