Vim MacPorts support

Rainer Müller raimue at macports.org
Thu Jul 23 11:51:17 PDT 2009


On 2009-07-23 20:02 , Maximilian Nickel wrote:
> i've started work on MacPorts support for Vim. Right now it consists
> of syntax coloring for Portfiles, lint support and autoloading stuff.
> Syntax coloring is still in early stages, down to the configure phase
> most stuff should work though.

Very nice, Max!

While being the maintainer of vim, I never got around to work on a
syntax file, so I appreciate your efforts.

> Lint support is implemented through Vim's compiler. Running :make when
> editing a Portfile will run port lint on it. If there are errors a
> quickfix window will open and display them. As port lint doesn't
> report line numbers for errors right now, there is no support for
> directly jumping to the errorneous lines yet.

We could either always print line numbers or add a --line-numbers switch
to port lint.

But note that some messages lint reports are about missing statements or
variables. What should the format be like if there is no line number to
print?

> Anyway, if you want to check it out, you can get the source with "svn
> co https://svn.macports.org/repository/macports/users/mnick/macports.vim"
> Just copy everything in that directory into your ~/.vim directory and
> you should be set

Are we allowed to also make changes? :-)

I suggest to move that to contrib/, as there is also already a language
module for BBEdit/TextWrangler. Would probably make sense to move these
into contrib/editors/ to keep some logical grouping. User directories
are the private area in the repo and I don't like editing there.

> I've not yet decided how to exactly color the syntax, so if you have
> suggestions i'd be happy to hear them, along with any other
> suggestions.

Some phases and common options are missing yet (tests.* and livecheck.*).

But do we really want to list each and every port option or would it be
enough to color anything that starts with the name of a phase followed
by a dot (${phase}.*), depends_*, use_* and the usual port options like
name, version, maintainer, etc.?

Rainer


More information about the macports-dev mailing list