newLISP Fan Club

Forum => Anything else we might add? => Topic started by: pjot on March 26, 2006, 09:45:09 AM

Title: VIM IDE
Post by: pjot on March 26, 2006, 09:45:09 AM
Recently I made some VIM macro's to turn VIM into a newLisp IDE. Three functions were added:



-Run: run current newLisp program

-Link: create standalone executable of current newLisp program

-Syntax: force syntax highlighting to newLisp (requires newLisp syntax file to be installed as 'newlisp' filetype)





Screenshot (look at the fancy newLisp menu and icon in the toolbar):



http://www.turtle.dds.nl/newlisp/vim.jpg



The macros can be downloaded here (//http). Windows users need 'which' for Win32 (//http) to run the linker successfully.



The toolbar icon is here (//http) including install instructions (down below the page).



Maybe the macro's are of use for somebody else as well.



Regards

Peter
Title:
Post by: pjot on March 26, 2006, 01:21:23 PM
Made a new screenshot to show how a newLisp program runs within VIM:



http://www.turtle.dds.nl/newlisp/vim.jpg





A program can be started from the menu or from the toolbar (as previously but not stated :-) ). Also some small adjustments on the statusbar.



Enjoy,

Peter
Title:
Post by: nigelbrown on March 26, 2006, 08:42:27 PM
Hi



I had my lsp file in a path with spaces (using winXP) so when I tried to run I think the spaces interrupted the file path as passed by:



" Execute current newLisp file - command: Run

function! NewlispRun()

   !newlisp %

endfunction

command! -complete=function Run :call NewlispRun()



Nigel
Title:
Post by: pjot on March 27, 2006, 02:29:36 AM
Hm, the '%' is an internal VIM symbol representing the path and filename of the current file. It should work out-of-the-box. If not it, looks like a problem in VIM for which I need to find a workaround...



Peter
Title:
Post by: pjot on March 27, 2006, 02:51:27 AM
Hi,



Just change the macro to this:



" Execute current newLisp file - command: Run
function! NewlispRun()
!newlisp "%"
endfunction
command! -complete=function Run :call NewlispRun()


Now it works, with spaces in the name and directory.



Peter