VIM IDE

Started by pjot, March 26, 2006, 09:45:09 AM

Previous topic - Next topic

pjot

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">http://www.turtle.dds.nl/newlisp/vim.jpg



The macros can be downloaded http://www.turtle.dds.nl/newlisp/vimrc.txt">here. Windows users need http://gnuwin32.sourceforge.net/packages/which.htm">'which' for Win32 to run the linker successfully.



The toolbar icon is http://www.turtle.dds.nl/newlisp/index.html">here including install instructions (down below the page).



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



Regards

Peter

pjot

#1
Made a new screenshot to show how a newLisp program runs within VIM:



http://www.turtle.dds.nl/newlisp/vim.jpg">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

nigelbrown

#2
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

pjot

#3
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

pjot

#4
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