packages feed

gf-3.6: doc/gf-editor-modes.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<LINK REL="stylesheet" TYPE="text/css" HREF="../css/style.css">
<meta name = "viewport" content = "width = device-width"><TITLE>Editor modes &amp; IDE integration for GF</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black">
<CENTER>
<H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>Editor modes &amp; IDE integration for GF</H1>
</CENTER>

<P></P>
<HR NOSHADE SIZE=1>
<P></P>

    <UL>
    <LI><A HREF="#toc1">Emacs</A>
    <LI><A HREF="#toc2">Eclipse</A>
    <LI><A HREF="#toc3">Gedit</A>
    <LI><A HREF="#toc4">Geany</A>
    <LI><A HREF="#toc5">Vim</A>
    </UL>

<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<P>
We collect GF modes for various editors on this page. Contributions are
welcome!
</P>

<A NAME="toc1"></A>
<H2>Emacs</H2>

<P>
<A HREF="../src/tools/gf.el">gf.el</A> by Johan Bockgård provides syntax highlighting and
automatic indentation and lets you run the GF Shell in an emacs buffer.
See installation instructions inside.
</P>

<A NAME="toc2"></A>
<H2>Eclipse</H2>

<P>
<A HREF="http://www.grammaticalframework.org/eclipse/index.html">GF Eclipse Plugin</A>
</P>

<A NAME="toc3"></A>
<H2>Gedit</H2>

<P>
<A HREF="http://johnjcamilleri.com/">John J. Camilleri</A>
provided the following syntax highlighting mode for
<A HREF="http://www.gedit.org/">Gedit</A> (the default text editor in Ubuntu).
</P>
<P>
Copy the file below to
<CODE>~/.local/share/gtksourceview-3.0/language-specs/gf.lang</CODE> (under Ubuntu).
</P>

<UL>
<LI><A HREF="../src/tools/gf.lang">gf.lang</A>
</UL>

<P>
Some helpful notes/links:
</P>

<UL>
<LI>The code is based heavily on the <CODE>haskell.lang</CODE> file which I found in
  <CODE>/usr/share/gtksourceview-2.0/language-specs/haskell.lang</CODE>.
<LI>Ruslan Osmanov recommends 
  <A HREF="http://osmanov-dev-notes.blogspot.com/2011/04/how-to-add-new-highlight-mode-in-gedit.html">registering your file extension as its own MIME type</A>
  (see also <A HREF="https://help.ubuntu.com/community/AddingMimeTypes">here</A>),
  however on my system the <CODE>.gf</CODE> extension was already registered
  as a generic font (<CODE>application/x-tex-gf</CODE>) and I didn't want to risk
  messing any of that up.
<LI>This is a quick 5-minute job and might require some tweaking.
  <A HREF="http://developer.gnome.org/gtksourceview/stable/lang-tutorial.html">The GtkSourceView language definition tutorial</A>
  is the place to start looking.
<LI>Contributions are welcome!
</UL>

<A NAME="toc4"></A>
<H2>Geany</H2>

<P>
<A HREF="http://johnjcamilleri.com/">John J. Camilleri</A> provided the following
<A HREF="http://www.geany.org/manual/dev/index.html#custom-filetypes">custom filetype</A>
config files for syntax highlighting in <A HREF="http://www.geany.org/">Geany</A>.
</P>
<P>
Copy one of the files below to <CODE>/usr/share/geany/filetypes.GF.conf</CODE>
(under Ubuntu). You will need to manually create the file.
</P>

<UL>
<LI><A HREF="../src/tools/light-filetypes.GF.conf">light-filetypes.GF.conf</A>
<LI><A HREF="../src/tools/dark-filetypes.GF.conf">dark-filetypes.GF.conf</A>
</UL>

<P>
You will also need to edit the <CODE>filetype_extensions.conf</CODE> file and add the
following line somewhere:
</P>

<PRE>
  GF=*.gf
</PRE>

<A NAME="toc5"></A>
<H2>Vim</H2>

<P>
<A HREF="https://github.com/gdetrez/vim-gf">vim-gf</A>
</P>

<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -thtml ./doc/gf-editor-modes.t2t -->
</BODY></HTML>