Newbie question on vim editor mode

Started by ski, September 24, 2006, 01:20:47 AM

Previous topic - Next topic

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

#1
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:



" 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

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