FixmeMode

A basic minor mode for highlighting FIXME, TODO, BUG, and other warning comments, and jumping to these tags in the buffer.

Lisp:fixme-mode.el

And another variant Lisp:fic-mode.el where fic stands for “fixme in comments (and strings)”, which is a true minor mode that only highlights the tags in strings and comments.

And yet another variant Lisp:fic-ext-mode.el which also supports TODO(author) style.

I’ve given fix-ext-mode.el a github https://github.com/lewang/fic-mode with some fixes.

It does work, but not as expected: The changes it makes to the font-locking are global, so even in buffers that are not in fixme-mode FIXMEs & Co. are highlighted and there is no way to disable them. I also wonder whether the call to grep could/should be replaced to a call of occur. But besides that: Cool! :-) --Tim Landscheidt
Wow, its been a long time since I looked at this code. Ok, I replaced the grep with occur (being a Linux guy I sometimes forget that the command line tools aren’t available for all OSs). The font-lock changes should also be undone when the mode is disabled now. Only thing I can’t seem to do is force the highlighting to apply to currently opened files (so you need to close it and open it again to see the changes. If anyone knows how to do this please let me know.). Let me know if you notice any other problems. – Bryan Waite

Just do as hi-lock; add this to the end of fic-mode:

  (font-lock-fontify-buffer)

And I suggest removing the lighter. It is not very important to show it and there is a lack of room in the modeline.


This highlighting of FIXMEs etc. can be done with WcheckMode. Here’s an example configuration:

    (defvar my-highlight-words
      '("FIXME" "TODO" "BUG"))
    ;; Ensure that the variable exists.
    (defvar wcheck-language-data nil)
    (push '("FIXME"
            (program . (lambda (strings)
                         (let (found)
                           (dolist (word my-highlight-words found)
                             (when (member word strings)
                               (push word found))))))
            (face . highlight)
            (read-or-skip-faces
             (nil)))
          wcheck-language-data)

Now ‘wcheck-change-language’ to FIXME and turn on ‘wcheck-mode’ (a minor mode).


Would be nice to integrate FixmeMode and WcheckMode with rfringe. It would give a visual indication in the fringe of the number and the buffer-relative positions of the FIXME notes throughout the buffer. See below for what it looks like. --DinoChiesa, 5 April 2011

http://imgur.com/RqBj7.png

actually, I built a simple fixme that does this, depends on rfringe. The code is here: Lisp:myfixme.el


CategoryNavigation