Newbie question on vim editor mode

Notices and updates
Locked
ski
Posts: 6
Joined: Fri Sep 22, 2006 6:11 am
Location: Kirkland, WA, USA
Contact:

Newbie question on vim editor mode

Post by ski »

Hi,

I like newlisp and have set up the vim syntax and .vimrc files. One question though. When I jump into the run mode (via NewlispRun), I get in running in another window, but it scrolls up over all windows (e.g. it does just open a window and run the code in it. If the program has output it wipes out the code in the upper window. Is this expected behavour or do I have something incorrect in my set up.

Thanks,

ski

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

Post by pjot »

Hi ski,

Probably you are using my .vimrc file (I recognize the 'NewlispRun' macro).

The behaviour depends on 1) what you are doing and 2) which version of VIM you are using.

If you are using VIM for Windows then you'll see a DOS box in which the output appears. With VIM for Linux the ouput appears in the same window as VIM, but 'splitted'.

The 'run' command just takes the internal VIM statement '!' to run the current program:

Code: Select all

" Execute current newLisp file - command: Run
function! NewlispRun()
	!newlisp "%"
endfunction
command! -complete=function Run :call NewlispRun()
That is all to it. VIM just dumps the output to a console, so the more output you have, the more it seems to 'wipe out' code in the upper screen. When your program is finished just pres <enter> and your code appears again. Unless your program never finishes, of course.

Peter

ski
Posts: 6
Joined: Fri Sep 22, 2006 6:11 am
Location: Kirkland, WA, USA
Contact:

Post by ski »

Peter,

Thanks for the reply. I checked the vim site and figured out that:

silent exe "!xterm -e newlisp % &"

does what I want by starting newlisp in an xterm window so I can see the code and the newlisp REPL loop at the same time.

cheers

ski

Locked