Am 11.01.2013 17:55, schrieb neilhwatson@gmail.com:
> " Testing
> function! Pastefile( FILE )
> let arg_file = $HOME."/.vim/cf3snippets/".a:FILE
> let @" = join( readfile( arg_file ), "\n" )
> put
> endfunction
> imap //tmp <c-r>=Pastefile( "template.cf" )<CR><ESC>A
>
>
> The above imap results in
> Code:
> bundle agent test {
>
> 0}
>
> The zero on the last line is not in the file template.cf. Where does the zero come from?
Of course.
A function returns zero per default.
You should let it return "" instead.
--
Andy
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Friday, January 11, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment