On Fri, Aug 18, 2006 at 04:44:26AM +0200, Meino Christian Cramer wrote: > Hi, > > I often need to place a header above a function defintion (C-source) > fpr documentational purposes. > > What I treid is to write a short function for vim, which dioes insert > the text skeleton -- but I did not find any already existing function > in the API which does this for me. With :i I got weird effects -- > sure my fault, but... . > > How can I insert text via a script ? > > Kind regards, > mcc
One way to do this is the ClassHeader() function (and associated map/autocommand) in my file of example vim functions, foo.vim : http://www.vim.org/script.php?script_id=72 This one is pretty old: I wrote it before there were such things as buffer-local mappings and ftplugins. HTH --Benji Fisher