IFC-MODE - Major mode for editing IFC SPF files.
Copyright (C) 2012 Olof-Joachim Frahm firstname.lastname@example.org
Release under a Simplified BSD license.
make to generate syntax and toc files. The necessary files are
downloaded and then preprocessed to extract the IFC types.
Then add the following to your
(add-to-list 'load-path "~/path/to/ifc-mode") (autoload 'ifc-spf-mode "ifc-mode" "Major mode for editing IFC SPF files." t) (add-to-list 'auto-mode-alist '("\\.ifc$" . ifc-spf-mode))
(At the moment only IFC2X3 TC1 is used, but in principle all definitions can be switched rather easily (load another generated file and change the documentation root URL). This could also be done automatically by parsing the correct version from the visited file.)
Syntax highlighting is enabled for the predefined IFC types and
enumerations. Additionally two functions for following object IDs are
ifc-mode-find-tag, which is bound to
default, the buffer is searched for a numeric tag at the point like
ifc-mode-find-uses, bound to
M-?, the buffer
is searched for only
#42, i.e. all uses of that ID.
If you're using evil-mode,
can be used instead of
ifc-mode-find-uses, because they do essentially
the same (searching for the next symbol) and additionally wrap around
ifc-mode-pop-find-tag, or the default
pop-tag-mark, restore the
previous point. (Wrap-around for
ifc-mode-find-uses isn't yet
implemented, but would definitely be useful to have.)
Documentation can be found using
ifc-mode-docs-lookup, bound to
C-c C-d h. The point has to be over an IFC identifier,
IFCMATERIAL, which has to be in the list of defined types.
(Resolving enumeration values isn't implemented yet.)