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.

In which weird file format, unreadable to other applications, does Notepad++ save its files and how I can change it?

I searched through all the settings/options, but didn't find anything.

How can I change the standard "save as" filetype of Notepad++?

share|improve this question
2  
I don't understand the statement "weird file format". When you create a new file the standard save is to save it as a normal text file. If you open an existing file and choose Save As the default format is the same as the file extension you opened. Is NP++ behaving differently from that? –  Beaner Feb 26 '10 at 17:41
    
What other applications are not able to open files saved by Notepad++? –  heavyd Feb 26 '10 at 17:51
    
@grunwald.philipp: can you elaborate on what you mean by "weird file format"? E.g. is it about ASCII/UTF-8/Unicode? –  Peter Mortensen Feb 26 '10 at 19:19
    
@Beaner: It seems the default format isn't/wasn't *.txt on my side. @heavyd+Mortensen: Dunno, I'm no expert in file format analysis. As I have found the correct answer, I'm wondering if that helps you get my problem? –  grunwald2.0 Feb 28 '10 at 13:01

2 Answers 2

up vote 3 down vote accepted

I think you want to change the default file format for new documents that Notepad++ uses when you run the program from the icon. If that's correct. You can change the File format of a new document like this.

  1. Navigate to C:\Program Files (x86)\Notepad++

  2. Then open the file config.model.xml (if you use Notepad++ to edit you won't be able to save as the file is in use.)

  3. Look for this line around line #28 <GUIConfig name="NewDocDefaultSettings" format="0" encoding="0" lang="1" />

  4. Then you have to change the value for "lang=0" by default it opens everything in txt format. If you look at step 3 I have "1" because I use it for PHP. You'll have to check the source code if you want to change it to anything else. As the developers did not list all the languages in this configuration file you could use.

Post back if you need further explanation.

share|improve this answer
1  
For reference: format="0" is Windows/DOS line ending sequence (CR LF). encoding="0" is for ANSI (others are UCS2Big/UCS2small/UTF8/UTF8-BOM). –  Peter Mortensen Feb 26 '10 at 19:17
    
Thanks Kelbizzle, indeed this helped! It seems I already achieved this, as I do have lang="0" activated in the file. Must've happened as I looked through the settings and changed some, I just don't know anymore which setting in the GUI this relates to. –  grunwald2.0 Feb 28 '10 at 12:59
    
@Peter Mortensen: Thanks for the comment, improved my understanding. –  grunwald2.0 Feb 28 '10 at 13:03
    
which file format did you want to default it to? –  Kelbizzle Mar 11 '10 at 4:04

The list for file associations, picked up from the source code: just change the set lang="langID"

    <associationMap>
    <!-- langID:
        L_TEXT: 0     L_PHP: 1        L_C: 2        L_CPP: 3       L_CS: 4         L_OBJC: 5
        L_JAVA: 6     L_RC: 7         L_HTML: 8     L_XML: 9       L_MAKEFILE: 10  L_PASCAL: 11
        L_BATCH:12    L_INI: 13       L_ASCII: 14   L_USER: 15     L_ASP: 16       L_SQL: 17
        L_VB: 18      L_JS: 19        L_CSS: 20     L_PERL: 21     L_PYTHON: 22    L_LUA: 23
        L_TEX: 24     L_FORTRAN: 25   L_BASH: 26    L_FLASH: 27    L_NSIS: 28      L_TCL: 29
        L_LISP: 30    L_SCHEME: 31    L_ASM: 32     L_DIFF: 33     L_PROPS: 34     L_PS: 35
        L_RUBY: 36    L_SMALLTALK:37  L_VHDL: 38    L_KIX: 39      L_AU3: 40       L_CAML: 41
        L_ADA: 42     L_VERILOG: 43   L_MATLAB: 44  L_HASKELL: 45  L_INNO: 46      L_SEARCHRESULT: 47
        L_CMAKE: 48   L_YAML: 49      L_COBOL 50    L_GUI4CLI: 51  L_D: 52         L_POWERSHELL: 53
        L_R: 54       L_JSP: 55
    -->
        <association langID="1" id="php_function"/>
        <association langID="2" id="c_function"/>
        <association langID="3" id="c_cpp_function"/>
        <association langID="6" id="java"/>
        <association langID="9" id="xml_node"/>
        <association langID="12" id="batch_label"/>
        <association langID="13" id="ini_section"/>
        <association langID="19" id="js_function"/>
        <association langID="21" id="perl_function"/>
        <association langID="26" id="bash_function"/>
        <association langID="28" id="nsis_syntax"/>
    <!--
        if langID cannot be found above, you can still set the file extensions
        <association ext=".my_passer_ext1" id="my_passer_id"/>
        <association ext=".my_passer_ext2" id="my_passer_id"/>

        for User Defined Languages:
        <association userDefinedLangName="my user defined language" id="my_udl_passer_id"/>
        <association userDefinedLangName="Autocad" id="my_autocad_passer_id"/>
    -->

    </associationMap>
share|improve this answer

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.