LB Booster
IDE and Compiler >> Compiler >> Using LBB with vi/vim http://lbb.conforums.com/index.cgi?board=compiler&action=display&num=1406735086 Using LBB with vi/vim
Post by James on Jul 30th, 2014, 3:44pm
Hi, I'm wondering how to setup vi/vim to use LBB as the compiler.
I'm running CYGWIN in Windows.
Any pointers?
-For all have sinned and come short of the glory of God
Re: Using LBB with vi/vim
Post by Richard Russell on Jul 30th, 2014, 5:07pm
Hi, I'm wondering how to setup vi/vim to use LBB as the compiler.
I don't know vi well enough to give precise details, but you need it to execute the command 'lbb -c -a -m progname.bas' where progname is the name of the program you are editing. If LBB isn't on the path then you can add it explicitly: 'path_to_lbb\lbb -c -a -m progname.bas'
There can't be many Liberty BASIC programmers who like using vi.
Richard. Re: Using LBB with vi/vim
Post by James on Jul 31st, 2014, 6:10pm
OK Thanks!
Re: Using LBB with vi/vim
Post by James on Aug 5th, 2014, 11:48am
:!cmd /c lbb -c -a -m %
(this is how to do it)
Note: Lbb doesn't like a source file with no extension
then to run it in the vim console (if you compiled as console application)
:!cmd /c yourprog
edit: make sure lbb.exe is in your home dir edit: also input doesn't seem to work right running THROUGH vim console (the compiled program)
Re: Using LBB with vi/vim
Post by James on Oct 10th, 2014, 3:26pm
OK, update!
I've found out how to run it better:
Install vim for windows, but use the non gui vim that comes with it.
Use PowerShell, and start it with a shortcut that starts in your LBB folder, not a special protected folder.
Run vim like this:
vim progname.bas
press esc, then colon
then type map <F5> :!lbb -c-a-m % press enter
press esc, then colon
then type map <F6> :!progname.exe press enter
now progname.exe is the name of your compiled prog
So: F5 enter in Vim compiles program F6 enter runs program