.nb files are Mathematica notebooks

0 views
Skip to first unread message

Szabolcs

unread,
Jan 16, 2008, 4:57:03 PM1/16/08
to vim_dev
Currently only *.m files are recognized as mma filetype
(Mathematica). *.nb files can also be safely linked to the mma file
type, as Mathematica notebooks just contain one big Mathematica
expression.

Of course one does not normally edit raw notebook files with a text
editor, but syntax colouring is useful for reading them.

thomas

unread,
Jan 17, 2008, 7:02:47 AM1/17/08
to vim_dev
> (Mathematica). *.nb files can also be safely linked to the mma file
> type, as Mathematica notebooks just contain one big Mathematica
> expression.

You can define such a link easily yourself. See :h ftdetect

> Of course one does not normally edit raw notebook files with a text
> editor

I think so too. The extension seems rather unique though.

Bram Moolenaar

unread,
Jan 17, 2008, 2:35:49 PM1/17/08
to Szabolcs, vim_dev

Szabolcs wrote:

I also see *.nb files listed as Nota Bene text files. I don't know what
Nota Bene is, but perhaps the file contents can be checked to be
something that looks like Mathematica?

--
"Software is like sex... it's better when it's free."
-- Linus Torvalds, initiator of the free Linux OS
Makes me wonder what FSF stands for...?

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Szabolcs

unread,
Jan 17, 2008, 3:30:14 PM1/17/08
to vim_dev


On Jan 17, 8:35 pm, Bram Moolenaar <B...@moolenaar.net> wrote:
> I also see *.nb files listed as Nota Bene text files. I don't know what
> Nota Bene is, but perhaps the file contents can be checked to be
> something that looks like Mathematica?
>

According to <http://filext.com/file-extension/nb>, Nota Bene is a
word processor and bibliographic manager.

Mathematica notebooks always begin with a comment, i.e. "(*" (without
the quotes). I am not sure whether there may be any whitespace before
the (*, but none of the notebooks I checked (created by versions 3.0,
5.2 and 6.0) had any. So perhaps any *.nb file whose first two
characters are (* could be linked to the mma file type?

Szabolcs

Bram Moolenaar

unread,
Jan 18, 2008, 5:37:52 AM1/18/08
to Szabolcs, vim_dev

Szabolcs wrote:

http://www.notabene.com/

I would guess their *.nb files are a binary format, something you
wouldn't want to edit with Vim. So handling all *.nb files as
Mathematica probably isn't a problem.

--
ARTHUR: If you do not open these doors, we will take this castle by force ...
[A bucket of slops land on ARTHUR. He tries to retain his dignity.]
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

Reply all
Reply to author
Forward
0 new messages