Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm unable to completely disable syntax highlighting for Java source code files in Notepad++.

I've commented out the Java sections in langs.model.xml and stylers.model.xml (even tried deleting those files to no avail) but if I create a new file and then save a file with .java extension then, bang! syntax colouring kicks in. Grrrrr. any way to do this?

You might think it's an absurd requirement but I'm preparing a Java certification and it's better to practise programming with no syntax help at all but I still like to use Notepad++ because I'm used to it and for its other features (multi-tabbed interface, reopen last used files... etc) instead of crappy plain old win notepad.

Thanx

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I'm not sure why commenting out the relevant sections did not work - was Notepad++ closed when you did that?

An alternative method is to disable the language from within Notepad++ and then add a user defined language assigned to the java extension.

  1. Go to Settings > Preferences > Language Menu/Tab Settings.

  2. Select Java on the Available items list.

  3. Click the arrow to add it to the Disabled items list.

    Screenshot of settings
    Click for full size

  4. Go to View > User-Defined Dialogue....

  5. Create New..., name it whatever you like. I named it Java_normal.

  6. Add java to the Ext. textbox.

    Screenshot of dialogue
    Click for full size

  7. Close the User Defined Language window.

  8. Restarting Notepad++ may be necessary.

share|improve this answer
    
Already done that, it doesn't help. As I understand it this preference modification just removes it from the interface, that is, Java disappears from the "Language" menu which lists available languages but not from the program "internals". If you create a new file and save it with .java ext it will still colourize it. –  b4nd0ler0 May 10 '12 at 8:15
    
@b4nd0ler0 Updated, this one should work. The user defined language with no highlighting should override the built in one - and I've actually tested making a new/saving/opening a .java file. There's more details at the official wiki, here. –  Bob May 10 '12 at 8:47
    
That definitively works. Thank you so much, you're a star. For the record I have also disabled the built-in brace matching in Prefs.>Misc.>Highlight matching tags –  b4nd0ler0 May 11 '12 at 5:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.