#!/bin/bash # Nekthuth plugin # Author="Frank Duncan " Revision=1.0 Date="26 June 2009" Description="Adds \l which will load all the forms starting with defun or defmacro in the current file into the lisp interpreter. Is not package aware" vim << VIMEND map l :python loadFileFunctions() python << EOF import vim def loadFileFunctions(): vim.command ("1,\$y f") fileStr = vim.eval("@f") vim.command ("let @f=@_") lispSend ("f", fileStr) EOF VIMEND lisp << LISPEND (defun eval-defuns (&rest forms) (mapcar (lambda (form) (when (and (consp form) (or (eql 'defmacro (car form)) (eql 'defun (car form)))) (eval form))) forms)) (nekthuth:register-receiver #\f #'eval-defuns) LISPEND