This wiki is out of date, use the continuation of this wiki instead

Tutorial:Setting up Fenix with ConTEXT

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 21:26, 6 August 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Revision as of 22:12, 6 August 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 16: Line 16:
# Go to Tools -> Set Highlighter -> Customize Types..., select Foxpro, click on Edit and change "prg" to "prg2". # Go to Tools -> Set Highlighter -> Customize Types..., select Foxpro, click on Edit and change "prg" to "prg2".
-== Compile ==+You can meddle with the colours all you like: Options -> Environment Options -> Colors.
-[[Image:Compilesetup.PNG]]+
-# Download the new fxc.bat ([[Media:ContextBatches.zip|ConTEXTBatches.zip]]: extract into fxi/fxc folder) and replace the old one by it.+
-# Setup ConTEXT like on the screenshot. Replace <code>XXXXXX</code> by the directory containing fxc.bat and fxc.exe, in both the ConTEXT setup and the fxc.bat. Parser rule is: <code>Error in file %n at line %l:*</code>. +
-# Note that the <code>-i "XXXXXX"</code> will allow you to include codefiles in the <code>XXXXXX</code> directory.+
-== Run ==+== Hotkeys ==
-[[Image:Runsetup.PNG]]+The setting up here happens in Options -> Environment Options -> [Execute Keys]. To add hotkeys for Fenix, click on the button Add and enter <code>prg,inc,fh</code> for extensions. Noted are generally used hotkeys between brackets, but this can be altered.
-# Setup ConTEXT like on the screenshot. Replace <code>XXXXXX</code> by the directory containing fxi.exe.+
-== Lookup on this wiki ==+=== Lookup on this wiki (F9/F12) ===
[[Image:Lookupsetup.PNG]] [[Image:Lookupsetup.PNG]]
-# Download fxw.bat ([[Media:ContextBatches.zip|ConTEXTBatches.zip]]: extract into fxi/fxc folder).+# Download fxw.bat ([[Media:ContextBatches.zip|ConTEXTBatches.zip]]: extract into fxi/fxc folder), if not done already.
-# Setup ConTEXT like on the screenshot. Replace <code>XXXXXX</code> by the directory you placed fxw.bat in, the fxc.bat.+# Setup Lookup hotkey:
 +## Execute: <code>fxw.bat</code>.
 +## Start in: <code>XXXXXX</code>.
 +## Parameters: <code>%w</code>.
 +## Save: <code>Nothing</code>.
 +## Now Replace <code>XXXXXX</code> by the directory you placed fxw.bat in.
 + 
This will allow you to hit a button (F9-F12) to lookup the word currently under your cursor in ConTEXT on FenixWiki. Alternatively you can use <code>%?</code> instead of <code>%w</code>, to enter the word you're looking for. A possible setup is <code>%w</code> on F9 and <code>%?</code> on F12. This will allow you to hit a button (F9-F12) to lookup the word currently under your cursor in ConTEXT on FenixWiki. Alternatively you can use <code>%?</code> instead of <code>%w</code>, to enter the word you're looking for. A possible setup is <code>%w</code> on F9 and <code>%?</code> on F12.
 +
 +=== Compile (F10) ===
 +# Download the new fxc.bat ([[Media:ContextBatches.zip|ConTEXTBatches.zip]]: extract into fxi/fxc folder) and replace the old one by it, if not done already.
 +# Setup Compile hotkey:
 +## Execute: <code>XXXXXX\fxc.bat</code>.
 +## Start in: <code>%p</code>.
 +## Parameters: <code>-i "XXXXXX" -g "%n"</code>.
 +## Save: <code>All files before execution</code>.
 +## Enable Capture console output.
 +## Compiler output parser rule: <code>Error in file %n at line %l:*</code>.
 +## Enable Scroll console to the last line.
 +## Replace <code>XXXXXX</code> by the directory containing fxc.bat and fxc.exe, in both the ConTEXT setup and fxc.bat.
 +## Parser rule is: <code>Error in file %n at line %l:*</code>.
 +Note that the <code>-i "XXXXXX"</code> will allow you to include codefiles in the <code>XXXXXX</code> directory.
 +
 +=== Run (F11) ===
 +# Setup Run hotkey:
 +## Execute: <code>fxi.exe</code>.
 +## Start in: <code>XXXXXX</code>.
 +## Parameters: <code>"%p%F.dcb"</code>.
 +## Save: <code>Nothing</code>.
 +## Replace <code>XXXXXX</code> by the directory containing fxi.exe.
== Advantages == == Advantages ==

Revision as of 22:12, 6 August 2007


Setting up Fenix with ConTEXT.

It is assumed Fenix Binaries are downloaded in a certain folder, thus in which fxi.exe and fxc.exe will be. With the Run and Lookup setup sections, a file is required: ConTEXTBatches.zip. It is required that this archive is extracted into the folder previously mentioned, the one containing fxi.exe and fxc.exe.

Here and there this folder will be denoted as XXXXXX. You will need to replace XXXXXX with the directory you extracted the binaries to, in both ConTEXT as the batch file (fxc.bat).

For example, you extracted the binaries to D:\Fenix\Executables\, then you will need to replace XXXXXX with D:\Fenix\Executables (watch that last \, there only needs to be one). This needs to be done in ConTEXT as well as the batch file (fxc.bat)

Contents

Syntax Highlighter

  1. Place fenix.chl in the folder ConTEXT\Highlighters
  2. Restart ConTEXT
  3. File -> New
  4. Go to Tools -> Set Highlighter -> Customize Types..., select Foxpro, click on Edit and change "prg" to "prg2".

You can meddle with the colours all you like: Options -> Environment Options -> Colors.

Hotkeys

The setting up here happens in Options -> Environment Options -> [Execute Keys]. To add hotkeys for Fenix, click on the button Add and enter prg,inc,fh for extensions. Noted are generally used hotkeys between brackets, but this can be altered.

Lookup on this wiki (F9/F12)

Image:Lookupsetup.PNG

  1. Download fxw.bat (ConTEXTBatches.zip: extract into fxi/fxc folder), if not done already.
  2. Setup Lookup hotkey:
    1. Execute: fxw.bat.
    2. Start in: XXXXXX.
    3. Parameters: %w.
    4. Save: Nothing.
    5. Now Replace XXXXXX by the directory you placed fxw.bat in.

This will allow you to hit a button (F9-F12) to lookup the word currently under your cursor in ConTEXT on FenixWiki. Alternatively you can use %? instead of %w, to enter the word you're looking for. A possible setup is %w on F9 and %? on F12.

Compile (F10)

  1. Download the new fxc.bat (ConTEXTBatches.zip: extract into fxi/fxc folder) and replace the old one by it, if not done already.
  2. Setup Compile hotkey:
    1. Execute: XXXXXX\fxc.bat.
    2. Start in: %p.
    3. Parameters: -i "XXXXXX" -g "%n".
    4. Save: All files before execution.
    5. Enable Capture console output.
    6. Compiler output parser rule: Error in file %n at line %l:*.
    7. Enable Scroll console to the last line.
    8. Replace XXXXXX by the directory containing fxc.bat and fxc.exe, in both the ConTEXT setup and fxc.bat.
    9. Parser rule is: Error in file %n at line %l:*.

Note that the -i "XXXXXX" will allow you to include codefiles in the XXXXXX directory.

Run (F11)

  1. Setup Run hotkey:
    1. Execute: fxi.exe.
    2. Start in: XXXXXX.
    3. Parameters: "%p%F.dcb".
    4. Save: Nothing.
    5. Replace XXXXXX by the directory containing fxi.exe.

Advantages

ConTEXT is a pretty handy text editor. It has quite a range of possibilities and the highlighter file is very up to date. When it is setup like described above, certain files are only needed in one directory: the fxi/fxc directory. These certain files contain: include files (*.inc), Fenix header files (*.fh) and DLL's (*.dll). Actually, any file can be included/imported if it's in the fxi/fxc directory. This brings advantages like saving disk space, updating a certain file is much easier and updating automatically affects all programs using it, not just one.

Source

Fenix for ConTEXT

Personal tools