📝 FreeFem++ parser for Emacs
Branch: master
Clone or download
Pull request Compare This branch is 2 commits ahead, 1 commit behind rrgalvan:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



An Emacs mode for the FreeFem++ language.

  • It is based on cc mode, from which it inherits its features, including syntax highlighting, automatic indentation (TAB key) and others. Current version (0.3) provides syntax highligting for more FreeFem++ reserved words and additional menu entries.
  • It defines the "Run buffer" function (key C-c C-c) as follows:
    1. Send current buffer (current FreeFem++ program) to the FreeFem++ interpreter.
    2. Then window is split into two frames and FreeFem++ output is displayed in the bottom one.
    3. If FreeFem++ returned with an error:
    • In the output buffer, the error line is highlighted
    • In the code buffer, the cursor goes to the error line and error is highlighted


Copy the file freefem++-mode.el into any directory located in your Emacs load-path. Then, add the appropriate lines into your .emacs configuration file, for instance:

	(autoload 'freefem++-mode "freefem++-mode"
		"Major mode for editing FreeFem++ code." t)
	(add-to-list 'auto-mode-alist '("\\.edp$" . freefem++-mode))
	(add-to-list 'auto-mode-alist '("\\.idp$" . freefem++-mode))

Optionally, you can also specify the desired FreeFem++ interpreter, for instance

	(setq freefempp-program "FreeFem++-nw")


	(setq freefempp-program "ff-mpirun -np 2")