VIM IDE

For the Compleat Fan
Locked
pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

VIM IDE

Post by 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

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

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

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

Regards
Peter
Last edited by pjot on Sun Mar 26, 2006 10:40 pm, edited 1 time in total.

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post by pjot »

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

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

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
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post by pjot »

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
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post by pjot »

Hi,

Just change the macro to this:

Code: Select all

" 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

Locked