> < ^ Date: Fri, 06 Dec 2002 08:27:09 +0100
> < ^ From: Greg Gamble <greg.gamble@math.rwth-aachen.de >
< ^ Subject: Re: Editor for wriring Gap programs

Dear GAP-Forum:
On Thu, Dec 05, 2002 at 07:48:23PM -0500, Sven Reichard wrote:
> On Thu, 5 Dec 2002, Javaid Aslam wrote:
>
> > Hello All,
> > Wonder if somebody has found (created) one decent text editor
> > with basic features such as Syntax Highlighting for writing Gap
> > programs.
> >
> > Thank you,
>
> In case you work under Unix, there's always emacs. There is (or used to
> be) a GAP mode for emacs in the etc directory of the distribution.
> ...

Indeed, the GAP mode files (written by Michael Smith) for emacs are included
in the current distribution in the etc directory, i.e. after the gap4r3.zoo
or gap4r3.tar.gz or gap4r3.zip archive is unpacked there are files
according to the following hierarchy:

gap4r3/
      etc/
         emacs/
              comint.el
              gap-mode.doc
              gap-mode.el
              gap-process.el

(The file gap4r3/etc/emacs/gap-mode.doc explains usage, of course.)

However, another `decent text editor' is vim and Frank Luebeck has supplied
GAP mode files which are also included in the gap4r3 archive. They are
located in:

gap4r3/
      etc/
         gap.vim
         gap_indent.vim

These files are well-commented, but Frank has also written a README
(unfortunately not in the gap4r3 archive - possibly it was written later -
since it's not too long it is appended to this email).

Regards,
Greg Gamble

### Franks's README.vim-utils ##############################################
HOWTO use the files gap.vim, gap_indent.vim with the

`vim' editor (http://www.vim.org/)

I have put the following lines in my ~/.vimrc file:

-------------------    from  ~/.vimrc  -------------------------------------
if has("syntax")
  syntax on             " Default to no syntax highlightning 
endif

" For GAP files
augroup gap
" Remove all gap autocommands
au!
autocmd BufRead,BufNewFile *.g,*.gi,*.gd source ~/.vim/gap.vim
autocmd BufRead,BufNewFile *.g,*.gi,*.gd set filetype=gap comments=s:##\ \ ,m:##\ \ ,e:##\ \ b:#

" I'm using the external program `par' for formating comment lines starting
" with `## '. Include these lines only when you have par installed.
autocmd BufRead,BufNewFile *.g,*.gi,*.gd set formatprg="par w76p4s0j"
autocmd BufWritePost,FileWritePost *.g,*.gi,*.gd set formatprg="par w76p0s0j"
augroup END

---------------------------------------------------------------------------

Then I copied the file GAPPATH/etc/gap.vim to: ~/.vim/gap.vim

Since I have now installed vim 6.0 I'm also using the new indent
functionality. For this I copied the file GAPPATH/etc/gap_indent.vim to:
~/.vim/indent/gap.vim

See the headers of the two mentioned files for additional comments. Adjust
details according to your personal taste. Send comments and suggestions to
Frank.Luebeck@Math.RWTH-Aachen.De

Frank Lübeck


> < [top]