M-x all-things-emacs

Quick Tip: Highlighting Java .properties Files

March 1st, 2007 by Rob Christie · 44 Comments

Java .properties files are normally formatted using conf-javaprop-mode. Recently, I was frustrated because a single quote in a property was highlighted such that multiple lines were colored like a string until there was another quote on another line. I decided I was going to fix it… It turns out that I didn’t have to look far. C-h f conf-javaprop-mode led me to read about conf-mode which led to finding the command conf-quote-normal. This command sets the syntax of ‘ and “ to punctuation. This is the joy of using emacs. It’s the little things. My new .emacs snippet follows:

(add-hook 'conf-javaprop-mode-hook 
          '(lambda () (conf-quote-normal nil)))

Before

Before conf-quote-normal

After

After conf-quote-normal

Tags: java · quick · tips

44 responses so far ↓

  • 1 Ryan McGeary // Feb 24, 2007 at 5:13 pm

    By default, conf-quote-normal is also bound to C-c ' in case you only want to enable it once for a current buffer.

    (bound to C-c " and C-c C-q too)

  • 2 Engagement rings // Jul 22, 2015 at 12:32 am

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 3 Personal Trainer Seattle // Jul 22, 2015 at 12:43 am

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 4 Con-Cret Pre Workout // Jul 23, 2015 at 4:18 pm

    ... [Trackback]

    [...] Find More Informations here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 5 amazin gas station video // Jul 24, 2015 at 9:02 am

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 6 amazin gas station video // Jul 24, 2015 at 10:37 am

    ... [Trackback]

    [...] Find More Informations here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 7 criminal defense lawyer // Jul 24, 2015 at 9:25 pm

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 8 Atlanta // Jul 25, 2015 at 1:53 pm

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 9 locksmith Sacramento ca // Jul 26, 2015 at 6:23 am

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 10 granite bay Locksmith // Jul 26, 2015 at 6:34 am

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 11 Buy Propecia Online Ohio Cheap // Jul 27, 2015 at 9:33 am

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 12 marsna.com // Jul 27, 2015 at 2:56 pm

    ... [Trackback]

    [...] There you will find 80982 more Infos: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 13 surf shop online // Jul 28, 2015 at 6:48 am

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 14 Omaha, NE chiropractor // Jul 31, 2015 at 6:17 pm

    ... [Trackback]

    [...] There you will find 62949 more Infos: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 15 Prodaja staklene ambalaze // Aug 1, 2015 at 4:34 am

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 16 security training // Aug 1, 2015 at 2:33 pm

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 17 certifiedhandymen.net // Aug 2, 2015 at 7:46 pm

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 18 http://tiptopplumbers.com // Aug 2, 2015 at 8:21 pm

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 19 a fantastic read // Aug 2, 2015 at 8:34 pm

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 20 One contractor's bid includes No. 15 underlayment and another contractor says he only uses No. 30 because it's the best. Who is right? // Aug 2, 2015 at 10:31 pm

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 21 social signals seo // Aug 2, 2015 at 10:34 pm

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 22 fda ventolin // Aug 3, 2015 at 1:36 pm

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 23 tiptopelectric.org // Aug 4, 2015 at 2:28 am

    ... [Trackback]

    [...] There you will find 66261 more Infos: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 24 www.tiptophvac.com // Aug 4, 2015 at 3:46 am

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 25 tiptopglassrepair.com // Aug 4, 2015 at 5:18 am

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 26 read the full info here // Aug 4, 2015 at 8:51 am

    ... [Trackback]

    [...] Find More Informations here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 27 http://www.skillfullcontracting.com // Aug 5, 2015 at 7:01 am

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 28 home foundation problems // Aug 5, 2015 at 10:24 am

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 29 link // Aug 5, 2015 at 1:08 pm

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 30 click reference // Aug 9, 2015 at 6:24 pm

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 31 go to my site // Aug 9, 2015 at 6:52 pm

    ... [Trackback]

    [...] Find More Informations here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 32 Google webmaster tools error fix // Aug 10, 2015 at 11:29 am

    ... [Trackback]

    [...] Read More Infos here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 33 check these guys out // Aug 10, 2015 at 10:11 pm

    ... [Trackback]

    [...] There you will find 76387 more Infos: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 34 click for more info // Aug 11, 2015 at 12:00 am

    ... [Trackback]

    [...] Read More here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 35 view // Aug 12, 2015 at 10:13 pm

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 36 best site // Aug 13, 2015 at 12:17 am

    ... [Trackback]

    [...] Read More Infos here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 37 trending topics // Aug 13, 2015 at 12:21 am

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 38 home electric service // Aug 13, 2015 at 11:37 pm

    ... [Trackback]

    [...] Read More Infos here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 39 http://optimumdentist.com // Aug 14, 2015 at 12:17 am

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 40 originalhandymen.com // Aug 14, 2015 at 4:32 am

    ... [Trackback]

    [...] There you will find 78152 more Infos: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 41 have a peek at this web-site // Aug 14, 2015 at 4:51 am

    ... [Trackback]

    [...] Read More Infos here: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 42 primehandymen.com // Aug 14, 2015 at 4:52 am

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 43 great post to read // Aug 14, 2015 at 4:59 am

    ... [Trackback]

    [...] There you will find 74286 more Infos: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]

  • 44 garbage dumpster rental // Aug 14, 2015 at 7:45 am

    ... [Trackback]

    [...] Informations on that Topic: emacsblog.org/2007/03/01/quick-tip-highlighting-java-properties-files/ [...]