#!/bin/bash # Nekthuth plugin # Author="Frank Duncan " Revision=1.0 Date="26 June 2009" Description="Lisp sends updates on the current package which is then displayed on the statusline." vim << VIMEND python << EOF import vim # Save the current window number, get the buffer number, move to it, do our work, move back def setStatus(msg): curwinnum = vim.eval("winnr()") bufwinnum = getBufferNum() vim.command (bufwinnum + "wincmd w") # Note that we coerce the first message out of the list vim.command ("setlocal statusline=Current\\ Package:\\ " + msg[0]) vim.command (curwinnum + "wincmd w") registerReceiver('s', setStatus, False) EOF VIMEND lisp << LISPEND (nekthuth:register-sender #\s (lambda () (package-name *package*))) LISPEND