开发者

Can Eclipse parse and use emacs-style meta information in source code?

In emacs, it is possible to start a file off with a line this:

/* -*- mode: java; c-basic-offset: 4; indent-tabs-mode: nil -*- */

This instructs emacs to use 4 spaces for indentation. I like the idea of storing this coding style meta-information directly and explicitly in the source code. Are there any options for doing this in other IDEs? Does eclipse in particular have the ability to configure itself from a line in the emacs format or someth开发者_JAVA技巧ing equivalent?


As far as I know: no, Eclipse Formatter won't configure itself when reading emacs instructions in the code.

This is why you can find Emacs plugins like this one for Ganymede allowing you to quickly open a file on Emacs from Eclipse!

Can Eclipse parse and use emacs-style meta information in source code?


(source: chaosnet.org)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜