From QB64 Wiki

Jump to: navigation, search

Gedit is a good alternative to the QB64 IDE, since the one in Linux doesn't have all of the features yet. It has Syntax highlighting for QB64, and the ability to compile and run programs. Matt Kilgore (DSMan) has contributed the following information for Linux users:

  • Download QB64 Linux Version:

Download QB64 Linux and put it in a QB64 folder in your home folder or your desktop. Then, make a folder inside of that for the version. Because Linux doesn't update, you'll have to re-download each new version, and by keeping it archived like this, you won't need to erase and copy over files, which could create more problems. When a new version comes out, just put it a new folder. This is helpful for updating the Gedit files, which will have to be done for each new version. See the FAQ for more installation information!

  • Setting up Syntax highlighting:

First thing to do is setup Syntax hilighting for QB64. I went ahead and completed one for QB64. It will absolutely get updated in the future as more commands are added. If there's something I missed let me know. Download to the file containing the QB64 Syntax:

Download the latest updated version of QB64 Linux keywords: qb64.lang

When you download it you will get the file qb64.lang. Put that file it in your home/.local/share/gtksourceview-2.0/language-specs/ folder. More then likely you'll have to create this folder, just create them and make sure to name them correctly. After that, restart Gedit and check to see if QB64 is listed in the languages. Then open a .bas file in it to see that everything is working correctly.

  • Adding Compile and Run functions

One very useful part of Gedit is that you can run bash scripts inside of Gedit.

  1. To enable this in the Gedit menus goto: Edit: preferences: Plugins Tab. Scroll down to external tools and enable it.
  2. Restart Gedit and look in the tools menu. There should be a choice for external tools and manage external tools.

  • Creating Script files

All that's left is to put in the scripts for QB64. I already wrote up scripts for compiling and running, though you could write your own:

Compiling: Change the cd path to the path to the qb64. executable!

#!/bin/sh cd ~/Desktop/QB64\ Stuff/qb64-ver935/qb64/ ./qb64 -c $GEDIT_CURRENT_DOCUMENT_PATH

Editing: Change the cd path to the path to the qb64. executable!

#!/bin/sh cd ~/Desktop/QB64\ Stuff/qb64-ver935/qb64/ y=${GEDIT_CURRENT_DOCUMENT_PATH%.*} y=${y##*/} ./$y

Setup:To set these up, go to the external tools manager, and click that button with the green plus in the bottom left. You'll get a new tool. Rename it to what you want, copy one of the scripts above, and if you want, map it to a key press (I mapped mine to F5 and <shift>F5). Then in the applicability section, click the button on the left and scroll down to 'QB64'. Do that for both scripts.

A program opened with Gedit: Screenshot of Gedit

See also:

Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in