Emacs plugins!

AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
<div class="IPBDescription">Specifically, cosmetic changes</div>I'm not sure how many of you are familiar with emacs, and most who are might not bother much with plugins... but I was sitting here in school, working on a project, when I remembered the neater way our C++ programs did things. In this case, I was mostly thinking of how certain items in the code were colored differently, like int bool etc were all colored blue, and comments were green, and so forth.
So, the idea struck me that there might be an emacs plugin that fiddles with text colors inside the program, making it a bit easier on the eyes. Does anyone know of such a thing?

Comments

  • puzlpuzl The Old Firm Join Date: 2003-02-26 Member: 14029Retired Developer, NS1 Playtester, Forum Moderators, Constellation
    Emacs has a huge supply of standard elisp to help the programmer, which include syntax highlighting, code cross referencing, file navigation, block folding, inline debugging, api documentation generation etc.

    Most of it is distributed with emacs out of the box and just needs to be enabled. Usually if you just open a .c, .h, .C or .cpp file it will turn on C-mode which will provide the bulk of what you want. Which version of emacs are you using? I recommend XEmacs. Don't be fooled by the name, you don't need X, you don't even need a GUI.
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    I'm not actually programming C with it(currently Moscow ML).
    I have no idea what version it is, since it came with these ancient computers with bothersome keyboards(though the copy/paste buttons are handy).
  • puzlpuzl The Old Firm Join Date: 2003-02-26 Member: 14029Retired Developer, NS1 Playtester, Forum Moderators, Constellation
    Copy/Paste buttons sound like they are SUN workstations. Do "M-x version" to get the emacs version. It is possible that the emacs you are using does not support colours. It should be still possible to use ansi character types to highlight your code. What language you do you want to syntax-highlight?
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    GNU Emacs 20.7.1 (sparc-sun-solaris2.7, X toolkit) of Tue Jul 4 2000 on zeppo

    SUN workstations is right.
    I'm sure it supports colors one way or another, since the text in the help sections is colored green and blue...
    ML is what I'd like highlighting for.
  • puzlpuzl The Old Firm Join Date: 2003-02-26 Member: 14029Retired Developer, NS1 Playtester, Forum Moderators, Constellation
    When you invoke emacs, is it popping up in a new window with 3d-like popup menus etc for "file, options" etc. Or does it look like something NASA used 40 years ago, with inverse video for the mode bar?
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    It looks like an old Atari game, reminds me vaguely of Civilization.
  • puzlpuzl The Old Firm Join Date: 2003-02-26 Member: 14029Retired Developer, NS1 Playtester, Forum Moderators, Constellation
    Try <a href="http://www.iro.umontreal.ca/~monnier/elisp/sml-mode.tar.gz" target="_blank">this</a>

    Standard ML major mode. If you need help loading it, just ask.
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    Looks like I do. The computers understand the filetype, at least..
  • puzlpuzl The Old Firm Join Date: 2003-02-26 Member: 14029Retired Developer, NS1 Playtester, Forum Moderators, Constellation
    Forum ping-pong is not the most efficient way to solve this problem. Grab me on irc.
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    edited December 2006
    See you in an hour or so, then. No IRC at school, but I've lost the steam anyway.
    EDIT: Oh hey, all I had to do was M-X font-lock-mode .
Sign In or Register to comment.