Author |
Topic: Using LBB with vi/vim (Read 636 times) |
|
James
New Member
member is offline
Posts: 42
|
|
Using LBB with vi/vim
« Thread started 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
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Using LBB with vi/vim
« Reply #1 on: Jul 30th, 2014, 5:07pm » |
|
on Jul 30th, 2014, 3:44pm, James wrote: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.
|
|
Logged
|
|
|
|
James
New Member
member is offline
Posts: 42
|
|
Re: Using LBB with vi/vim
« Reply #2 on: Jul 31st, 2014, 6:10pm » |
|
OK Thanks!
|
|
Logged
|
|
|
|
James
New Member
member is offline
Posts: 42
|
|
Re: Using LBB with vi/vim
« Reply #3 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)
|
« Last Edit: Aug 5th, 2014, 12:03pm by James » |
Logged
|
|
|
|
James
New Member
member is offline
Posts: 42
|
|
Re: Using LBB with vi/vim
« Reply #4 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
|
« Last Edit: Oct 10th, 2014, 3:31pm by James » |
Logged
|
|
|
|
|